summaryrefslogtreecommitdiff
path: root/vpxenc.c
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2012-05-02 14:12:57 -0700
committerJohann <johannkoenig@google.com>2012-06-04 15:50:44 -0700
commitc8a88a7642f0f8a0e7599800441c7ba175469cf6 (patch)
tree7027d6a4377cd668e569f9ea78cfc2ef2585bb25 /vpxenc.c
parentcd0bf0e40720e5d6924e319096160dd48362708f (diff)
downloadlibvpx-c8a88a7642f0f8a0e7599800441c7ba175469cf6.tar
libvpx-c8a88a7642f0f8a0e7599800441c7ba175469cf6.tar.gz
libvpx-c8a88a7642f0f8a0e7599800441c7ba175469cf6.tar.bz2
libvpx-c8a88a7642f0f8a0e7599800441c7ba175469cf6.zip
Explicitly discard fwrite/fread return values
Using if(); triggers an empty body warning with clang Change-Id: I0fa2ee676400a974b40f8eaafca9ae668107eebb
Diffstat (limited to 'vpxenc.c')
-rw-r--r--vpxenc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/vpxenc.c b/vpxenc.c
index b9aa8e170..a86e23756 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -245,7 +245,7 @@ void stats_write(stats_io_t *stats, const void *pkt, size_t len)
{
if (stats->file)
{
- if(fwrite(pkt, 1, len, stats->file));
+ (void) fwrite(pkt, 1, len, stats->file);
}
else
{
@@ -338,7 +338,7 @@ static int read_frame(struct input_state *input, vpx_image_t *img)
* write_ivf_frame_header() for documentation on the frame header
* layout.
*/
- if(fread(junk, 1, IVF_FRAME_HDR_SZ, f));
+ (void) fread(junk, 1, IVF_FRAME_HDR_SZ, f);
}
for (plane = 0; plane < 3; plane++)
@@ -468,7 +468,7 @@ static void write_ivf_file_header(FILE *outfile,
mem_put_le32(header + 24, frame_cnt); /* length */
mem_put_le32(header + 28, 0); /* unused */
- if(fwrite(header, 1, 32, outfile));
+ (void) fwrite(header, 1, 32, outfile);
}
@@ -486,14 +486,14 @@ static void write_ivf_frame_header(FILE *outfile,
mem_put_le32(header + 4, pts & 0xFFFFFFFF);
mem_put_le32(header + 8, pts >> 32);
- if(fwrite(header, 1, 12, outfile));
+ (void) fwrite(header, 1, 12, outfile);
}
static void write_ivf_frame_size(FILE *outfile, size_t size)
{
char header[4];
mem_put_le32(header, size);
- fwrite(header, 1, 4, outfile);
+ (void) fwrite(header, 1, 4, outfile);
}
@@ -541,7 +541,7 @@ struct EbmlGlobal
void Ebml_Write(EbmlGlobal *glob, const void *buffer_in, unsigned long len)
{
- if(fwrite(buffer_in, 1, len, glob->stream));
+ (void) fwrite(buffer_in, 1, len, glob->stream);
}
#define WRITE_BUFFER(s) \
@@ -2259,8 +2259,8 @@ static void get_cx_data(struct stream_state *stream,
}
}
- fwrite(pkt->data.frame.buf, 1,
- pkt->data.frame.sz, stream->file);
+ (void) fwrite(pkt->data.frame.buf, 1, pkt->data.frame.sz,
+ stream->file);
}
stream->nbytes += pkt->data.raw.sz;
break;