Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2021-04-27 09:13:00 +0300
committerMartin Storsjö <martin@martin.st>2021-04-27 09:16:50 +0300
commitbd7f051168149a97867cceb8dcd5fd33d56a4957 (patch)
tree6e257372818137a49367d2913329fbe660636720 /tools
parentee54837b0be349ac05c7806ba9df5810fb2ca693 (diff)
Remove a variable that is set but not used
This fixes warnings when building with the top of tree version of clang: tools/input/ivf.c:69:12: warning: variable 'res' set but not used [-Wunused-but-set-variable] Alternatively, a `(void)res` cast also marks the variable as used, silencing the same warning.
Diffstat (limited to 'tools')
-rw-r--r--tools/input/ivf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/input/ivf.c b/tools/input/ivf.c
index e37fe99..d1fa05e 100644
--- a/tools/input/ivf.c
+++ b/tools/input/ivf.c
@@ -66,13 +66,12 @@ static int64_t rl64(const uint8_t *const p) {
static int ivf_open(IvfInputContext *const c, const char *const file,
unsigned fps[2], unsigned *const num_frames, unsigned timebase[2])
{
- size_t res;
uint8_t hdr[32];
if (!(c->f = fopen(file, "rb"))) {
fprintf(stderr, "Failed to open %s: %s\n", file, strerror(errno));
return -1;
- } else if ((res = fread(hdr, 32, 1, c->f)) != 1) {
+ } else if (fread(hdr, 32, 1, c->f) != 1) {
fprintf(stderr, "Failed to read stream header: %s\n", strerror(errno));
fclose(c->f);
return -1;
@@ -95,9 +94,9 @@ static int ivf_open(IvfInputContext *const c, const char *const file,
uint8_t data[8];
c->broken = 0;
for (*num_frames = 0;; (*num_frames)++) {
- if ((res = fread(data, 4, 1, c->f)) != 1) break; // EOF
+ if (fread(data, 4, 1, c->f) != 1) break; // EOF
size_t sz = rl32(data);
- if ((res = fread(data, 8, 1, c->f)) != 1) break; // EOF
+ if (fread(data, 8, 1, c->f) != 1) break; // EOF
const uint64_t ts = rl64(data);
if (*num_frames && ts <= c->last_ts)
c->broken = 1;