From 2391d7ae5d8a145a250a8b80ab8c93ba74eba030 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Fri, 8 Jan 2010 17:12:57 -0800 Subject: [PATCH] fixed format warnings --- configure | 2 +- configure.in | 2 +- lib/as3/abc.c | 2 +- lib/as3/code.c | 6 +++--- lib/as3/pool.c | 12 ++++++------ lib/devices/pdf.c | 2 +- lib/devices/render.c | 2 +- lib/gfxfont.c | 8 ++++---- lib/gfxpoly/convert.c | 2 +- lib/gfxpoly/poly.c | 4 ++-- lib/gfxpoly/renderpoly.c | 2 +- lib/jpeg.c | 2 +- lib/modules/swffont.c | 2 +- lib/modules/swfrender.c | 2 +- lib/os.c | 2 +- lib/pdf/GFXOutputDev.cc | 2 +- lib/pdf/xpdf-changes.patch | 2 +- lib/png.c | 2 +- lib/q.c | 8 ++++---- lib/readers/swf.c | 2 +- lib/rfxswf.c | 2 +- lib/wav.c | 8 +++----- src/jpeg2swf.c | 2 +- src/png2swf.c | 6 +++--- src/swfc.c | 2 +- src/swfcombine.c | 2 +- src/swfdump.c | 2 +- src/swfextract.c | 2 +- src/wav2swf.c | 2 +- 29 files changed, 47 insertions(+), 49 deletions(-) diff --git a/configure b/configure index 043e6f2..abe5a95 100755 --- a/configure +++ b/configure @@ -1901,7 +1901,7 @@ if test "x${srcdir}" != "x."; then exit 1 fi -WARNINGS="-Wimplicit -Wreturn-type -Wno-write-strings" +WARNINGS="-Wimplicit -Wreturn-type -Wno-write-strings -Wformat" if test "x$ENABLE_WARNINGS" '!=' "x";then WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls -Wno-write-strings -D_FORTIFY_SOURCE=2 " fi diff --git a/configure.in b/configure.in index f9ff1e7..4c8307b 100644 --- a/configure.in +++ b/configure.in @@ -43,7 +43,7 @@ if test "x${srcdir}" != "x."; then exit 1 fi -WARNINGS="-Wimplicit -Wreturn-type -Wno-write-strings" +WARNINGS="-Wimplicit -Wreturn-type -Wno-write-strings -Wformat" if test "x$ENABLE_WARNINGS" '!=' "x";then WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls -Wno-write-strings -D_FORTIFY_SOURCE=2 " fi diff --git a/lib/as3/abc.c b/lib/as3/abc.c index 6de2c2d..7e11e1c 100644 --- a/lib/as3/abc.c +++ b/lib/as3/abc.c @@ -777,7 +777,7 @@ void* swf_ReadABC(TAG*tag) DEBUG printf("method %d) %s ", t, m->name); DEBUG params_dump(stdout, m->parameters, m->optional_parameters); - DEBUG printf("flags=%02x\n", t, m->flags); + DEBUG printf("flags=%02x\n", m->flags); if(m->flags&0x08) { m->optional_parameters = list_new(); diff --git a/lib/as3/code.c b/lib/as3/code.c index 8e41f22..541ebf5 100644 --- a/lib/as3/code.c +++ b/lib/as3/code.c @@ -255,10 +255,10 @@ code_t* code_atposition(codelookup_t*l, int pos) void lookupswitch_print(lookupswitch_t*l) { - printf("default: %08x\n", l->def); + printf("default: %08x\n", (int)l->def); code_list_t*t = l->targets; while(t) { - printf("target: %08x\n", t->code); + printf("target: %08x\n", (int)t->code); t = t->next; } } @@ -990,7 +990,7 @@ int code_dump2(code_t*c, abc_exception_list_t*exceptions, abc_file_t*file, char* if(c->branch) fprintf(fo, "->%d", c->branch->pos); else - fprintf(fo, "%08x", c->branch); + fprintf(fo, "%08x", (unsigned int)c->branch); } else if(*p == 's') { char*s = string_escape((string_t*)data); fprintf(fo, "\"%s\"", s); diff --git a/lib/as3/pool.c b/lib/as3/pool.c index edd048b..3889ee6 100644 --- a/lib/as3/pool.c +++ b/lib/as3/pool.c @@ -185,9 +185,9 @@ char* namespace_tostring(namespace_t*ns) char*s = escape_string(ns->name); char*string = (char*)malloc(strlen(access)+strlen(s)+7); if(!s) - sprintf(string, "[%s]NULL", access, s); + sprintf(string, "[%s]NULL", access); else if(!*s) - sprintf(string, "[%s]\"\"", access, s); + sprintf(string, "[%s]\"\"", access); else sprintf(string, "[%s]%s", access, s); free(s); @@ -953,7 +953,7 @@ int pool_find_float(pool_t*pool, double x) { int i = array_find(pool->x_ints, &x); if(i<=0) { - fprintf(stderr, "Couldn't find int \"%d\" in constant pool\n", x); + fprintf(stderr, "Couldn't find int \"%f\" in constant pool\n", x); return 0; } return i; @@ -965,7 +965,7 @@ int pool_find_namespace(pool_t*pool, namespace_t*ns) int i = array_find(pool->x_namespaces, ns); if(i<0) { char*s = namespace_tostring(ns); - fprintf(stderr, "Couldn't find namespace \"%s\" %08x in constant pool\n", s, ns); + fprintf(stderr, "Couldn't find namespace \"%s\" %08x in constant pool\n", s, (int)ns); free(s); return 0; } @@ -991,7 +991,7 @@ int pool_find_string(pool_t*pool, const char*str) string_t s = string_new2(str); int i = array_find(pool->x_strings, &s); if(i<=0) { - fprintf(stderr, "Couldn't find string \"%s\" in constant pool\n", s); + fprintf(stderr, "Couldn't find string \"%s\" in constant pool\n", str); return 0; } return i; @@ -1232,7 +1232,7 @@ void pool_dump(pool_t*pool, FILE*fo, char flags) int freq = (int)(ptroff_t)array_getvalue(pool->x_strings, t); if(flags&1) fprintf(fo, "%5d %d) ", freq, t); if(flags&1) fwrite(str.str, str.len, 1, fo); - if(flags&1) fprintf(fo, "\n", t); + if(flags&1) fprintf(fo, "\n"); } fprintf(fo, "%d namespaces\n", pool->x_namespaces->num); for(t=1;tx_namespaces->num;t++) { diff --git a/lib/devices/pdf.c b/lib/devices/pdf.c index bbbf9be..9e6365b 100644 --- a/lib/devices/pdf.c +++ b/lib/devices/pdf.c @@ -235,7 +235,7 @@ void pdf_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyphnr, gfxcolor_t*color int fontid = (int)(ptroff_t)gfxfontlist_getuserdata(i->fontlist, font->id); PDF_setfont(i->p, fontid, matrix->m00); char name[32]; - sprintf(name, "%c\0", glyphnr+32); + sprintf(name, "%c", glyphnr+32); if(fabs(matrix->tx - i->lastx) > 0.001 || matrix->ty != i->lasty) { PDF_show_xy2(i->p, name, strlen(name), matrix->tx, matrix->ty); diff --git a/lib/devices/render.c b/lib/devices/render.c index cdba442..8e0ada0 100644 --- a/lib/devices/render.c +++ b/lib/devices/render.c @@ -822,7 +822,7 @@ char*gfximage_asXPM(gfximage_t*img, int depth) int d= 256/depth; char*str = (char*)malloc(img->width*img->height*4 + 500 + 16*depth*depth*depth); char*p = str; - p+= sprintf(p, "static char *noname[] = {\n\"%d %d 262144 3\",\n"); + p+= sprintf(p, "static char *noname[] = {\n\"%d %d 262144 3\",\n", img->width, img->height); int r,g,b; for(r=0;rnum_glyphs <= 0) { - fprintf(stderr, "File %s contains %d glyphs\n", face->num_glyphs); + fprintf(stderr, "File %s contains %d glyphs\n", filename, (int)face->num_glyphs); return 0; } @@ -333,9 +333,9 @@ gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quali error = FT_Load_Glyph(face, t, FT_LOAD_NO_BITMAP); if(error) { if(hasname) - fprintf(stderr, "Warning: glyph %d/%d (unicode %d, name %s) has return code %d\n", t, face->num_glyphs, glyph2unicode[t], name, error); + fprintf(stderr, "Warning: glyph %d/%d (unicode %d, name %s) has return code %d\n", t, (int)face->num_glyphs, glyph2unicode[t], name, error); else - fprintf(stderr, "Warning: glyph %d/%d (unicode %d) has return code %d\n", t, face->num_glyphs, glyph2unicode[t], error); + fprintf(stderr, "Warning: glyph %d/%d (unicode %d) has return code %d\n", t, (int)face->num_glyphs, glyph2unicode[t], error); omit = 2; #if 0 @@ -358,7 +358,7 @@ gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quali if(!omit) { error = FT_Get_Glyph(face->glyph, &glyph); if(error) { - fprintf(stderr, "Couldn't get glyph %d/%d, error:%d\n", t, face->num_glyphs, error); + fprintf(stderr, "Couldn't get glyph %d/%d, error:%d\n", t, (int)face->num_glyphs, error); omit = 3; } } diff --git a/lib/gfxpoly/convert.c b/lib/gfxpoly/convert.c index 39517d7..f67699e 100644 --- a/lib/gfxpoly/convert.c +++ b/lib/gfxpoly/convert.c @@ -92,7 +92,7 @@ static void convert_file(const char*filename, polywriter_t*w, double gridsize) break; double x,y; char s[256]; - if(sscanf(line, "%lf %lf %s", &x, &y, &s) == 3) { + if(sscanf(line, "%lf %lf %s", &x, &y, (char*)&s) == 3) { if(s && !strcmp(s,"moveto")) { w->moveto(w, convert_coord(x,z), convert_coord(y,z)); count++; diff --git a/lib/gfxpoly/poly.c b/lib/gfxpoly/poly.c index 53b45e2..eb1b6b1 100644 --- a/lib/gfxpoly/poly.c +++ b/lib/gfxpoly/poly.c @@ -201,10 +201,10 @@ void gfxpoly_dump(gfxpoly_t*poly) { int s,t; double g = poly->gridsize; - fprintf(stderr, "polyon %08x (gridsize: %f)\n", poly, poly->gridsize); + fprintf(stderr, "polyon %08x (gridsize: %f)\n", (int)poly, poly->gridsize); gfxpolystroke_t*stroke = poly->strokes; for(;stroke;stroke=stroke->next) { - fprintf(stderr, "%08x", stroke); + fprintf(stderr, "%08x", (int)stroke); for(s=0;snum_points-1;s++) { point_t a = stroke->points[s]; point_t b = stroke->points[s+1]; diff --git a/lib/gfxpoly/renderpoly.c b/lib/gfxpoly/renderpoly.c index 57e341c..240859d 100644 --- a/lib/gfxpoly/renderpoly.c +++ b/lib/gfxpoly/renderpoly.c @@ -175,7 +175,7 @@ unsigned char* render_polygon(gfxpoly_t*polygon, intbbox_t*bbox, double zoom, wi } if(fill.is_filled && lastx!=buf->width) { /* we're bleeding, fill over padding, too. */ - fprintf(stderr, "Polygon %08x is bleeding in line %d\n", polygon, y); + fprintf(stderr, "Polygon %08x is bleeding in line %d\n", (int)polygon, y); fill_bitwise(line, lastx, width8*8); assert(line[width8-1]&0x01); bleeding = 1; diff --git a/lib/jpeg.c b/lib/jpeg.c index 24bf2ed..71483f6 100644 --- a/lib/jpeg.c +++ b/lib/jpeg.c @@ -227,7 +227,7 @@ boolean mem_fill_input_buffer (j_decompress_ptr cinfo) void mem_skip_input_data (j_decompress_ptr cinfo, long num_bytes) { struct jpeg_source_mgr* mgr = cinfo->src; - printf("skip %d +%d\n", size - mgr->bytes_in_buffer, num_bytes); + printf("skip %d +%ld\n", size - mgr->bytes_in_buffer, num_bytes); if(num_bytes<=0) return; mgr->next_input_byte += num_bytes; diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index c16cf05..986c07d 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -146,7 +146,7 @@ SWFFONT* swf_LoadTrueTypeFont(const char*filename, char flashtype) FT_Set_Pixel_Sizes (face, 16*loadfont_scale*scale, 16*loadfont_scale*scale); if(face->num_glyphs <= 0) { - fprintf(stderr, "File %s contains %d glyphs\n", face->num_glyphs); + fprintf(stderr, "File %s contains %d glyphs\n", filename, (int)face->num_glyphs); return 0; } diff --git a/lib/modules/swfrender.c b/lib/modules/swfrender.c index 6524089..9df996f 100644 --- a/lib/modules/swfrender.c +++ b/lib/modules/swfrender.c @@ -833,7 +833,7 @@ static void change_state(int y, state_t* state, renderpoint_t*p) layer_t*before=0, *self=0, *after=0; if(DEBUG&2) { - printf("[(%d,%d)/%d/%d-%d]", p->x, y, p->depth, p->shapeline->fillstyle0, p->shapeline->fillstyle1); + printf("[(%f,%d)/%d/%d-%d]", p->x, y, p->depth, p->shapeline->fillstyle0, p->shapeline->fillstyle1); } search_layer(state, p->depth, &before, &self, &after); diff --git a/lib/os.c b/lib/os.c index ccb0041..fddaee9 100755 --- a/lib/os.c +++ b/lib/os.c @@ -210,7 +210,7 @@ char* mktempname(char*ptr) { // used to be mktemp. This does remove the warnings, but // It's not exactly an improvement. #ifdef HAVE_LRAND48 - sprintf(ptr, "%s%s%08x%08x",dir,sep,lrand48(),lrand48()); + sprintf(ptr, "%s%s%08x%08x",dir,sep,(unsigned int)lrand48(),(unsigned int)lrand48()); #else # ifdef HAVE_RAND sprintf(ptr, "%s%s%08x%08x",dir,sep,rand(),rand()); diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index 843dc5c..b450e54 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -1917,7 +1917,7 @@ void GFXOutputDev::restoreState(GfxState *state) { if(verbose) { int t; for(t=0;t<=statepos;t++) { - printf("%08x ", states[t].state); + printf("%08x ", (unsigned int)states[t].state); } printf("\n"); } diff --git a/lib/pdf/xpdf-changes.patch b/lib/pdf/xpdf-changes.patch index dbc02ae..9068a67 100644 --- a/lib/pdf/xpdf-changes.patch +++ b/lib/pdf/xpdf-changes.patch @@ -870,7 +870,7 @@ diff -u -r1.5 -r1.6 + // used to be mktemp. This does remove the warnings, but + // It's not exactly an improvement. +#ifdef HAVE_LRAND48 -+ sprintf(ptr, "%s%s%08x%08x",dir,sep,lrand48(),lrand48()); ++ sprintf(ptr, "%s%s%08x%08x",dir,sep,(unsigned int)lrand48(),(unsigned int)lrand48()); +#else +# ifdef HAVE_RAND + sprintf(ptr, "%s%s%08x%08x",dir,sep,rand(),rand()); diff --git a/lib/png.c b/lib/png.c index b74dfb0..1738151 100644 --- a/lib/png.c +++ b/lib/png.c @@ -122,7 +122,7 @@ static int png_read_header(FILE*fi, struct png_header*header) return 0; } if(a!=8 && (b==2 || b==6)) { - printf("Bpp %d in mode %d not supported!\n", a); + printf("Bpp %d in mode %d not supported!\n", b, a); return 0; } if(c!=0) { diff --git a/lib/q.c b/lib/q.c index 67597df..a2d7a63 100644 --- a/lib/q.c +++ b/lib/q.c @@ -508,7 +508,7 @@ void _trie_dump(trielayer_t*t, char*buffer, int pos) } if(t->rest) { buffer[pos]=0; - printf("%s%s %08x\n", buffer, t->rest, t->data); + printf("%s%s %08x\n", buffer, t->rest, (int)t->data); } } @@ -1083,9 +1083,9 @@ void dict_dump(dict_t*h, FILE*fi, const char*prefix) dictentry_t*e = h->slots[t]; while(e) { if(h->key_type!=&charptr_type) { - fprintf(fi, "%s%08x=%08x\n", prefix, e->key, e->data); + fprintf(fi, "%s%08x=%08x\n", prefix, (int)e->key, (int)e->data); } else { - fprintf(fi, "%s%s=%08x\n", prefix, e->key, e->data); + fprintf(fi, "%s%s=%08x\n", prefix, (char*)e->key, (int)e->data); } e = e->next; } @@ -1337,7 +1337,7 @@ static void freestring(void*data) static void dumpmapentry(void*data, const void*key, void*value) { FILE*fi = (FILE*)data; - fprintf(fi, "%s=%s\n", key, (char*)value); + fprintf(fi, "%s=%s\n", (char*)key, (char*)value); } void map_dump(map_t*map, FILE*fi, const char*prefix) { diff --git a/lib/readers/swf.c b/lib/readers/swf.c index 5bff2a1..7cb3580 100644 --- a/lib/readers/swf.c +++ b/lib/readers/swf.c @@ -92,7 +92,7 @@ void map16_free(map16_t*map) void map16_add_id(map16_t*map, int nr, void*id) { if(map->ids[nr]) - fprintf(stderr, "Warning: ID %d defined more than once\n"); + fprintf(stderr, "Warning: ID %d defined more than once\n", nr); map->ids[nr] = id; } void map16_remove_id(map16_t*map, int nr) diff --git a/lib/rfxswf.c b/lib/rfxswf.c index c9006c1..d9444d6 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -1881,7 +1881,7 @@ int swf_WriteCGI(SWF * swf) sprintf(s,"Content-type: application/x-shockwave-flash\n" "Accept-Ranges: bytes\n" - "Content-Length: %lu\n" + "Content-Length: %d\n" "Expires: Thu, 13 Apr 2000 23:59:59 GMT\n" "\n",len); diff --git a/lib/wav.c b/lib/wav.c index ff577c7..5bd30d7 100644 --- a/lib/wav.c +++ b/lib/wav.c @@ -74,16 +74,14 @@ int wav_read(struct WAV*wav, const char* filename) return 0; } if(block.size + 8 < filesize) - fprintf(stderr, "wav_read: warning - more tags (%d extra bytes)\n", - filesize - block.size - 8); + fprintf(stderr, "wav_read: warning - more tags (%lu extra bytes)\n", filesize - block.size - 8); if(block.size == filesize) /* some buggy software doesn't generate the right tag length */ block.size = filesize - 8; if(block.size + 8 > filesize) - fprintf(stderr, "wav_read: warning - short file (%d bytes missing)\n", - block.size + 8 - filesize); + fprintf(stderr, "wav_read: warning - short file (%lu bytes missing)\n", block.size + 8 - filesize); if(fread(b, 1, 4, fi) < 4) { fclose(fi); @@ -198,7 +196,7 @@ int wav_write(struct WAV*wav, const char*filename) void wav_print(struct WAV*wav) { - printf("tag:%04x channels:%d samples/sec:%d bytes/sec:%d align:%d bits/sample:%d size:%d\n", + printf("tag:%04x channels:%d samples/sec:%lu bytes/sec:%lu align:%d bits/sample:%d size:%d\n", wav->tag, wav->channels, wav->sampsPerSec, wav->bytesPerSec, wav->align, wav->bps, wav->size); } diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index da3c318..9981a15 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -632,7 +632,7 @@ int main(int argc, char **argv) int i; for (i = 0; i < global.nfiles; i++) { if (VERBOSE(3)) - fprintf(stderr, "[%03i] %s (%i%%, 1/%i)\n", i, + fprintf(stderr, "[%03i] %s (%i%%)\n", i, image[i].filename, image[i].quality); t = MovieAddFrame(&swf, t, image[i].filename, image[i].quality, image[i].width, image[i].height); diff --git a/src/png2swf.c b/src/png2swf.c index 8c1d6e6..91f2188 100644 --- a/src/png2swf.c +++ b/src/png2swf.c @@ -197,7 +197,7 @@ int png_read_header(FILE*fi, struct png_header*header) exit(1); } if(a!=8 && (b==2 || b==6)) { - fprintf(stderr, "Bpp %d in mode %d not supported!\n", a); + fprintf(stderr, "Bpp %d in mode %d not supported!\n", b, a); exit(1); } if(c!=0) { @@ -553,7 +553,7 @@ TAG* PNG2Image(TAG*t, U16 id, char*filename, int*width, int*height) } if(!zimagedata || uncompress(imagedata, &imagedatalen, zimagedata, zimagedatalen) != Z_OK) { - fprintf(stderr, "Couldn't uncompress IDAT chunk (%d bytes) in %s!\n", imagedatalen, filename); + fprintf(stderr, "Couldn't uncompress IDAT chunk (%lu bytes) in %s!\n", imagedatalen, filename); if(zimagedata) free(zimagedata); return 0; @@ -1067,7 +1067,7 @@ void args_callback_usage(char *name) printf("-q , --quiet Omit normal log messages, only log errors\n"); printf("-C , --cgi For use as CGI- prepend http header, write to stdout\n"); printf("-V , --version Print version information and exit\n"); - printf("-s , --scale Scale image to % size.\n"); + printf("-s , --scale Scale image to %% size.\n"); printf("\n"); } diff --git a/src/swfc.c b/src/swfc.c index 42db7f4..9163534 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -2691,7 +2691,7 @@ int parseColor2(const char*str, RGBA*color) return 1; } int len=strlen(str); - U8 alpha = 255; + int alpha = 255; if(strchr(str, '/')) { len = strchr(str, '/')-str; sscanf(str+len+1,"%02x", &alpha); diff --git a/src/swfcombine.c b/src/swfcombine.c index 378bf06..7daec9c 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -316,7 +316,7 @@ void args_callback_usage(char *name) printf("-f , --frame The following identifier is a frame or framelabel, not an id or objectname\n"); printf("-x , --movex x Adjust position of slave by pixels\n"); printf("-y , --movey y Adjust position of slave by pixels\n"); - printf("-s , --scale Adjust size of slave by percent (e.g. 100% = original size)\n"); + printf("-s , --scale Adjust size of slave by percent (e.g. 100%% = original size)\n"); printf("-r , --rate Set movie framerate to (frames/sec)\n"); printf("-X , --width Force movie bbox width to (default: use master width (not with -t))\n"); printf("-Y , --height Force movie bbox height to (default: use master height (not with -t))\n"); diff --git a/src/swfdump.c b/src/swfdump.c index 61bdc34..0828ea4 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -609,7 +609,7 @@ void handleVideoFrame(TAG*tag, char*prefix) deblock = swf_GetBits(tag, 1); if(deblock) - printf(" deblock ", deblock); + printf(" deblock %d ", deblock); quantizer = swf_GetBits(tag, 5); printf(" quant: %d ", quantizer); } diff --git a/src/swfextract.c b/src/swfextract.c index ee96ad2..e385f1f 100644 --- a/src/swfextract.c +++ b/src/swfextract.c @@ -701,7 +701,7 @@ void handlejpeg(TAG*tag) } else { int id = GET16(tag->data); - fprintf(stderr, "Object %d is not a JPEG picture!\n",id, jpegtables); + fprintf(stderr, "Object %d is not a JPEG picture!\n", id); exit(1); } } diff --git a/src/wav2swf.c b/src/wav2swf.c index 153f8f1..72919e5 100644 --- a/src/wav2swf.c +++ b/src/wav2swf.c @@ -113,7 +113,7 @@ int args_callback_option(char*name,char*val) samplerate = 44100; else { fprintf(stderr, "Invalid samplerate: %d\n", samplerate); - fprintf(stderr, "Allowed values: 11025, 22050, 44100\n", samplerate); + fprintf(stderr, "Allowed values: 11025, 22050, 44100\n"); exit(1); } return 1; -- 1.7.10.4