fix compiler warnings

gcc gives warnings like this:

warning: ignoring return value of ‘fscanf’, declared with attribute
warn_unused_result

Assign value to a variable, cast to (void) to discard it.
This commit is contained in:
Christian Hesse
2015-05-15 11:33:25 +02:00
parent f4f6d54ffd
commit 08829cbc3b
3 changed files with 6 additions and 3 deletions

View File

@ -94,7 +94,8 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
int cpus = -1;
do {
cpus++;
fgets(buffer, 255, file);
char * s = fgets(buffer, 255, file);
(void) s;
} while (String_startsWith(buffer, "cpu"));
fclose(file);