summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthieu Darbois <mayeut@users.noreply.github.com>2015-10-21 20:53:22 +0200
committerMatthieu Darbois <mayeut@users.noreply.github.com>2015-10-21 20:53:22 +0200
commitf080ab8ce022f06e47c96ea444b00df7c2204814 (patch)
treef8decb1c652d2d0c7bb4b2405edb0dcd0c6eab85 /src
parentb06bed7b7bcf73a3a282d8206ac526689685ce8d (diff)
parentad7eb5630e89541b226b8f9c163711e8715eaa45 (diff)
Merge pull request #638 from stweil/master
Fix format strings and unneeded assignment
Diffstat (limited to 'src')
-rw-r--r--src/bin/jp2/convert.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c
index 73ec9f6e..d3f2c388 100644
--- a/src/bin/jp2/convert.c
+++ b/src/bin/jp2/convert.c
@@ -1255,7 +1255,7 @@ int imagetopgx(opj_image_t * image, const char *outfile)
}
}
strncpy(name, outfile, dotpos);
- sprintf(name+dotpos, "_%d.pgx", compno);
+ sprintf(name+dotpos, "_%u.pgx", compno);
fdest = fopen(name, "wb");
/* don't need name anymore */
@@ -1339,7 +1339,7 @@ static char *skip_int(char *start, int *out_n)
char *s;
char c;
- *out_n = 0; s = start;
+ *out_n = 0;
s = skip_white(start);
if(s == NULL) return NULL;
@@ -1812,7 +1812,7 @@ int imagetopnm(opj_image_t * image, const char *outfile, int force_split)
{
const char *tt = (triple?"RGB_ALPHA":"GRAYSCALE_ALPHA");
- fprintf(fdest, "P7\n# OpenJPEG-%s\nWIDTH %d\nHEIGHT %d\nDEPTH %d\n"
+ fprintf(fdest, "P7\n# OpenJPEG-%s\nWIDTH %d\nHEIGHT %d\nDEPTH %u\n"
"MAXVAL %d\nTUPLTYPE %s\nENDHDR\n", opj_version(),
wr, hr, ncomp, max, tt);
alpha = image->comps[ncomp - 1].data;
@@ -1918,7 +1918,7 @@ if(v > 65535) v = 65535; else if(v < 0) v = 0;
const size_t dotpos = olen - 4;
strncpy(destname, outfile, dotpos);
- sprintf(destname+dotpos, "_%d.pgm", compno);
+ sprintf(destname+dotpos, "_%u.pgm", compno);
}
else
sprintf(destname, "%s", outfile);
@@ -2155,7 +2155,7 @@ static int imagetoraw_common(opj_image_t * image, const char *outfile, OPJ_BOOL
for(compno = 0; compno < image->numcomps; compno++)
{
- fprintf(stdout,"Component %d characteristics: %dx%dx%d %s\n", compno, image->comps[compno].w,
+ fprintf(stdout,"Component %u characteristics: %dx%dx%d %s\n", compno, image->comps[compno].w,
image->comps[compno].h, image->comps[compno].prec, image->comps[compno].sgnd==1 ? "signed": "unsigned");
w = (int)image->comps[compno].w;