summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-01-10 16:59:56 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-01-10 16:59:56 +0100
commit3ee955a2f282121a73be6b4b7c959e5d7c1d507e (patch)
treec8d8301704bf7450b3bd7c41f0e9159273a60f90 /tests
parent2b9712ca2da02e80115dd85b96e3392f9274ad83 (diff)
tests: y4mreader: use int for fgetc
Assigning the return value of fgetc to char truncates its value. It will not be possible to distinguish between EOF and a valid character.
Diffstat (limited to 'tests')
-rw-r--r--tests/y4mreader.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/y4mreader.c b/tests/y4mreader.c
index 7dc711b6..caded8ad 100644
--- a/tests/y4mreader.c
+++ b/tests/y4mreader.c
@@ -55,9 +55,8 @@ parse_int (const gchar * str, guint * out_value_ptr)
static gboolean
parse_header (Y4MReader * file)
{
- gint i, j;
+ gint i, j, b;
guint8 header[BUFSIZ];
- gint8 b;
size_t s;
gchar *str;
@@ -185,9 +184,8 @@ y4m_reader_close (Y4MReader * file)
static gboolean
skip_frame_header (Y4MReader * file)
{
- gint i;
+ gint i, b;
guint8 header[BUFSIZ];
- gint8 b;
size_t s;
memset (header, 0, BUFSIZ);