-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile on Ubuntu LTS 14.04 #1
Comments
Check for retcode is not required there actually. The read() will not read in pre-initialized variable. If write() fails, there's nothing to be done about it :) |
Now we need to explain this to gcc. |
You're welcome ;) |
xemul
pushed a commit
that referenced
this issue
Oct 22, 2015
CID 131309 (#1 of 1): Uninitialized scalar variable (UNINIT) 19. uninit_use: Using uninitialized value exit_code.
xemul
pushed a commit
that referenced
this issue
Oct 22, 2015
CID 131307 (#1 of 1): Resource leak (RESOURCE_LEAK) 20. leaked_handle: Handle variable fd going out of scope leaks the handle.
xemul
pushed a commit
that referenced
this issue
Oct 22, 2015
CID 131305 (#1 of 1): Resource leak (RESOURCE_LEAK) 20. leaked_storage: Variable f going out of scope leaks the storage it points to. CID 131304 (#1 of 1): Resource leak (RESOURCE_LEAK) 16. leaked_storage: Variable f going out of scope leaks the storage it points to. CID 131302 (#1 of 1): Resource leak (RESOURCE_LEAK) 14. leaked_handle: Handle variable fd going out of scope leaks the handle. CID 131301 (#1 of 1): Dereference null return value (NULL_RETURNS) 4. dereference: Dereferencing a pointer that might be null f when calling fscanf
xemul
pushed a commit
that referenced
this issue
Oct 22, 2015
8. negative_returns: wait_sock is passed to a parameter that cannot be negative.
xemul
pushed a commit
that referenced
this issue
Oct 22, 2015
CID 131308 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking p suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
xemul
pushed a commit
that referenced
this issue
Oct 22, 2015
CID 131298 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS) 9. negative_returns: wait_sock is passed to a parameter that cannot be negative.
xemul
pushed a commit
that referenced
this issue
Oct 22, 2015
CID 131296 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: goto free;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
src/ct.c: In function ‘spawn_wait’:
src/ct.c:80:6: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result]
read(pipe[0], &ret, sizeof(ret));
^
src/ct.c: In function ‘spawn_wake’:
src/ct.c:87:7: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(pipe[1], &ret, sizeof(ret));
^
cc1: all warnings being treated as errors
make[1]: *** [src/ct.o] Error 1
make: *** [src/libct.so] Error 2
The text was updated successfully, but these errors were encountered: