[Flake-enc-svnlog] SF.net SVN: flake-enc:[243]
Status: Beta
Brought to you by:
jbr79
From: <jb...@us...> - 2009-01-01 17:33:11
|
Revision: 243 http://flake-enc.svn.sourceforge.net/flake-enc/?rev=243&view=rev Author: jbr79 Date: 2009-01-01 17:33:07 +0000 (Thu, 01 Jan 2009) Log Message: ----------- silence some gcc warnings Modified Paths: -------------- flake/flake.c util/wavinfo.c Modified: flake/flake.c =================================================================== --- flake/flake.c 2009-01-01 17:07:55 UTC (rev 242) +++ flake/flake.c 2009-01-01 17:33:07 UTC (rev 243) @@ -420,7 +420,9 @@ fprintf(stderr, "Error initializing encoder.\n"); return 1; } - fwrite(s.header, 1, header_size, files->ofp); + if (fwrite(s.header, 1, header_size, files->ofp) != 1) { + fprintf(stderr, "\nError writing header to output\n"); + } // print encoding parameters if(first_file && !opts->quiet) { @@ -451,7 +453,7 @@ ts = ts % 60; th = tm / 60; tm = tm % 60; - fprintf(stderr, "samples: %llu (", wf.samples); + fprintf(stderr, "samples: %"PRIu64" (", wf.samples); if(th) fprintf(stderr, "%dh", th); fprintf(stderr, "%dm", tm); fprintf(stderr, "%d.%03ds)\n", ts, (int)tms); @@ -473,7 +475,9 @@ if(fs < 0) { fprintf(stderr, "\nError encoding frame\n"); } else if(fs > 0) { - fwrite(frame, 1, fs, files->ofp); + if(fwrite(frame, 1, fs, files->ofp) != 1) { + fprintf(stderr, "\nError writing frame to output\n"); + } samplecount = MAX(samplecount, samplecount+nr); if(!opts->quiet) { bytecount += fs; @@ -504,7 +508,9 @@ if(!flake_get_streaminfo(&s, &strminfo)) { uint8_t strminfo_data[34]; flake_write_streaminfo(&strminfo, strminfo_data); - fwrite(strminfo_data, 1, 34, files->ofp); + if (fwrite(strminfo_data, 1, 34, files->ofp) != 1) { + fprintf(stderr, "\nError writing header to output\n"); + } } } Modified: util/wavinfo.c =================================================================== --- util/wavinfo.c 2009-01-01 17:07:55 UTC (rev 242) +++ util/wavinfo.c 2009-01-01 17:33:07 UTC (rev 243) @@ -284,7 +284,7 @@ printf("File:\n"); printf(" Name: %s\n", wi->fname); if(wf->seekable) { - printf(" File Size: %lld\n", wf->file_size); + printf(" File Size: %"PRIu64"\n", wf->file_size); } else { printf(" File Size: unknown\n"); } @@ -300,8 +300,8 @@ printf(" Block Align: %d bytes\n", wf->block_align); printf(" Bit Width: %d\n", wf->bit_width); printf("Data:\n"); - printf(" Start: %lld\n", wf->data_start); - printf(" Data Size: %lld\n", wf->data_size); + printf(" Start: %"PRIu64"\n", wf->data_start); + printf(" Data Size: %"PRIu64"\n", wf->data_size); leftover = wf->file_size - wf->data_size - wf->data_start; if(leftover < 0) { if(!wf->seekable) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |