chiark / gitweb /
lib/resample.c: Quieten some warnings better.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 7 May 2013 14:16:01 +0000 (15:16 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 22 May 2013 23:46:47 +0000 (00:46 +0100)
Newer GCC isn't fooled by `mumble = 0;' any more.  Apparently `if
(mumble) {}' works.

lib/resample.c

index bee3d95..0363d99 100644 (file)
@@ -99,7 +99,7 @@ void resample_close(struct resampler *rs) {
   if(rs->state)
     src_delete(rs->state);
 #else
-  rs = 0;                               /* quieten compiler */
+  if(rs){}                              /* quieten compiler */
 #endif
 }
 
@@ -307,7 +307,7 @@ size_t resample_convert(const struct resampler *rs,
   if(output != input)
     xfree(output);
   xfree(input);
-  eof = 0;             /* quieten compiler */
+  if(eof){}                             /* quieten compiler */
   /* Report how many input bytes were actually consumed */
   //fprintf(stderr, "converted %zu frames\n", nframesin);
   return nframesin * rs->input_bytes_per_frame;