Subject: fgets prototype bug?
To: None <email@example.com>
From: Simon Burge <firstname.lastname@example.org>
Date: 11/16/1999 15:49:01
Is is a bug that fgets() takes an "int" as the size of the object and
not a size_t? Look at the following when compiled on an alpha:
alpha:/tmp 187> cat foo.c
fgets(buf, sizeof buf, stdin);
alpha:/tmp 188> cc -c -Wconversion foo.c
foo.c: In function `foo':
foo.c:7: warning: passing arg 2 of `fgets' with different width due to prototype
If I change the "sizeof buf" to "(int)sizeof buf" it obviously gets rid
of the warning, but that doesn't seem right...