diff --git a/src/video_compress/cmpto_j2k.cpp b/src/video_compress/cmpto_j2k.cpp index f87da7557..6c5723ad5 100644 --- a/src/video_compress/cmpto_j2k.cpp +++ b/src/video_compress/cmpto_j2k.cpp @@ -52,9 +52,10 @@ #endif // HAVE_CONFIG_H #include +#include // for PRIdMAX, PRIuMAX #include #include -#include // for uintmax_t +#include // for intmax_t, uintmax_t #include // for numeric_limits #include #include @@ -741,10 +742,12 @@ static void usage(bool full) { std::nextafter(std::numeric_limits::max(), \ -std::numeric_limits::infinity()); \ if (val < (minval) || val > maxval) { \ - LOG(LOG_LEVEL_ERROR) \ - << "[J2K] Wrong value " << (str) \ - << " for " #var "! Value must be >= " << (minval) \ - << ".\n"; \ + MSG(ERROR, \ + "Wrong value %.0f (%s) for " #var \ + "! Value must be in range [%" PRIdMAX \ + "..%" PRIuMAX "].\n", \ + val, (str), (intmax_t) (minval), \ + maxval); \ return NULL; \ } \ (var) = val; \