From 55792f3b09011e95b13c1e5fdd59a6cfc8c5bfc3 Mon Sep 17 00:00:00 2001 From: no92 Date: Fri, 31 May 2024 20:02:23 +0200 Subject: [PATCH] tests/ansi: fix fgetpos warnings --- tests/ansi/fgetpos.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/ansi/fgetpos.c b/tests/ansi/fgetpos.c index b01fd13d07..66ea2e8b69 100644 --- a/tests/ansi/fgetpos.c +++ b/tests/ansi/fgetpos.c @@ -2,6 +2,8 @@ #include int main(int argc, char *argv[]) { + (void) argc; + FILE *f = fopen(argv[0], "r"); assert(f); @@ -15,7 +17,7 @@ int main(int argc, char *argv[]) { ret = fseek(f, 0, SEEK_END); assert(!ret); - off_t end_off = ftell(f); + long end_off = ftell(f); fpos_t end_pos; ret = fgetpos(f, &end_pos); @@ -23,9 +25,11 @@ int main(int argc, char *argv[]) { ret = fsetpos(f, &start_pos); assert(!ret); - assert(ftello(f) == 0); + assert(ftell(f) == 0); ret = fsetpos(f, &end_pos); assert(!ret); - assert(ftello(f) == end_off); + assert(ftell(f) == end_off); + + return 0; }