Skip to content

Commit ec3f472

Browse files
committed
vcomp/cmpto_j2k: ASSIGN_CHECK_VAL: print both bounds
1 parent 1ae1768 commit ec3f472

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/video_compress/cmpto_j2k.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@
5252
#endif // HAVE_CONFIG_H
5353

5454
#include <cassert>
55+
#include <cinttypes> // for PRIdMAX, PRIuMAX
5556
#include <cmath>
5657
#include <condition_variable>
57-
#include <cstdint> // for uintmax_t
58+
#include <cstdint> // for intmax_t, uintmax_t
5859
#include <limits> // for numeric_limits
5960
#include <mutex>
6061
#include <string>
@@ -741,10 +742,12 @@ static void usage(bool full) {
741742
std::nextafter(std::numeric_limits<typeof(var)>::max(), \
742743
-std::numeric_limits<double>::infinity()); \
743744
if (val < (minval) || val > maxval) { \
744-
LOG(LOG_LEVEL_ERROR) \
745-
<< "[J2K] Wrong value " << (str) \
746-
<< " for " #var "! Value must be >= " << (minval) \
747-
<< ".\n"; \
745+
MSG(ERROR, \
746+
"Wrong value %.0f (%s) for " #var \
747+
"! Value must be in range [%" PRIdMAX \
748+
"..%" PRIuMAX "].\n", \
749+
val, (str), (intmax_t) (minval), \
750+
maxval); \
748751
return NULL; \
749752
} \
750753
(var) = val; \

0 commit comments

Comments
 (0)