diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c index 493555db..59d28afb 100644 --- a/src/bin/jp2/opj_compress.c +++ b/src/bin/jp2/opj_compress.c @@ -699,7 +699,7 @@ static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *param OPJ_UINT32 numlayers = 0, numresolution = 0, matrix_width = 0; char *s = opj_optarg; - sscanf(s, "%ud", &numlayers); + sscanf(s, "%u", &numlayers); s++; if (numlayers > 9) s++; @@ -871,7 +871,7 @@ static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *param char *s = opj_optarg; POC = parameters->POC; - while (sscanf(s, "T%ud=%ud,%ud,%ud,%ud,%ud,%4s", &POC[numpocs].tile, + while (sscanf(s, "T%u=%u,%u,%u,%u,%u,%4s", &POC[numpocs].tile, &POC[numpocs].resno0, &POC[numpocs].compno0, &POC[numpocs].layno1, &POC[numpocs].resno1, &POC[numpocs].compno1, POC[numpocs].progorder) == 7) { diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index a6bc182a..136cc9c1 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -629,7 +629,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para case 'r': /* reduce option */ { - sscanf(opj_optarg, "%ud", &(parameters->core.cp_reduce)); + sscanf(opj_optarg, "%u", &(parameters->core.cp_reduce)); } break; @@ -638,7 +638,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para case 'l': /* layering option */ { - sscanf(opj_optarg, "%ud", &(parameters->core.cp_layer)); + sscanf(opj_optarg, "%u", &(parameters->core.cp_layer)); } break; @@ -678,7 +678,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para case 't': /* Input tile index */ { - sscanf(opj_optarg, "%ud", ¶meters->tile_index); + sscanf(opj_optarg, "%u", ¶meters->tile_index); parameters->nb_tile_to_decode = 1; } break;