openjp2/jp2: Fix two format strings 1143/head
authorStefan Weil <sw@weilnetz.de>
Wed, 5 Sep 2018 19:51:30 +0000 (21:51 +0200)
committerStefan Weil <sw@weilnetz.de>
Wed, 5 Sep 2018 19:52:43 +0000 (21:52 +0200)
Compiler warnings:

src/lib/openjp2/jp2.c:1008:35: warning:
 too many arguments for format [-Wformat-extra-args]
src/lib/openjp2/j2k.c:1928:73: warning:
 format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘OPJ_OFF_T {aka long int}’ [-Wformat=]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
src/lib/openjp2/j2k.c
src/lib/openjp2/jp2.c

index 28c7513f228dff20064c7fe2075ca3ae90e6775a..4169cd672b78eae5a7ea9222b0288820ccbd9772 100644 (file)
@@ -1925,7 +1925,8 @@ static OPJ_BOOL opj_j2k_read_soc(opj_j2k_t *p_j2k,
     /* FIXME move it in a index structure included in p_j2k*/
     p_j2k->cstr_index->main_head_start = opj_stream_tell(p_stream) - 2;
 
-    opj_event_msg(p_manager, EVT_INFO, "Start to read j2k main header (%d).\n",
+    opj_event_msg(p_manager, EVT_INFO,
+                  "Start to read j2k main header (%" PRId64 ").\n",
                   p_j2k->cstr_index->main_head_start);
 
     /* Add the marker to the codestream index*/
index c79ea7316aff706d980f218779e073f72a287f74..f15f45ae7718dea4e20855e60bf86b6406a1b9c2 100644 (file)
@@ -1005,7 +1005,7 @@ static OPJ_BOOL opj_jp2_check_color(opj_image_t *image, opj_jp2_color_t *color,
                 if (!pcol_usage[i]) {
                     is_sane = 0U;
                     opj_event_msg(p_manager, EVT_WARNING,
-                                  "Component mapping seems wrong. Trying to correct.\n", i);
+                                  "Component mapping seems wrong. Trying to correct.\n");
                     break;
                 }
             }