mirror of
https://github.com/troglobit/finit.git
synced 2026-10-07 00:00:23 +07:00
Fix GCC warnings with _FORTIFY_SOURCE=2
- Decleare some return values with (void)fn(), for cases where we don't care (dropping table headers), or best effor - Check return value from fgets() and chdir() in some cases that are valid, i.e., continuing execution is pointless Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ void cgroup_init(void)
|
||||
}
|
||||
|
||||
/* Skip first line, header */
|
||||
fgets(buf, sizeof(buf), fp);
|
||||
(void)fgets(buf, sizeof(buf), fp);
|
||||
while (fgets(buf, sizeof(buf), fp)) {
|
||||
char *cgroup;
|
||||
char rc[80];
|
||||
|
||||
Reference in New Issue
Block a user