mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 20:35:49 +01:00
cmph: Handle fgets() return value
Newer versions of the GNU libc have started to warn if the result of the call is unused.
This commit is contained in:
parent
4398e1fde2
commit
3d999b47e5
@ -155,7 +155,7 @@ static cmph_uint32 count_nlfile_keys(FILE *fd)
|
|||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
fgets(buf, BUFSIZ, fd);
|
if (fgets(buf, BUFSIZ, fd) == NULL) break;
|
||||||
if (feof(fd)) break;
|
if (feof(fd)) break;
|
||||||
if (buf[strlen(buf) - 1] != '\n') continue;
|
if (buf[strlen(buf) - 1] != '\n') continue;
|
||||||
++count;
|
++count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user