Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: syscall_helpers: fix a warning
Fix the following warning when building libbpf-tools: syscall_helpers.c: In function ‘init_syscall_names’: syscall_helpers.c:63:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] 63 | fgets(buf, sizeof(buf), f); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ We're not interested in the return value of the first call to fgets, because we want to skip the first line and in the case of error it will be caught by the following call to fgets. A funny note is that we can't say just "(void) f()" to suppress the warning, so I wrote it as "(void) !!f()", which works. Signed-off-by: Anton Protopopov <[email protected]>
- Loading branch information