Created
October 13, 2013 00:18
-
-
Save KristianLyng/6956499 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ristian@luke:~$ cat foo.c | |
| #include <stdio.h> | |
| void test_function(int i) | |
| { | |
| printf("This function does nothing\n"); | |
| } | |
| int main(void) | |
| { | |
| printf("test\n"); | |
| } | |
| kristian@luke:~$ gcc foo.c | |
| kristian@luke:~$ gcc -Wall foo.c | |
| foo.c: In function ‘main’: | |
| foo.c:11:1: warning: control reaches end of non-void function [-Wreturn-type] | |
| kristian@luke:~$ gcc -Wall -Wextra foo.c | |
| foo.c: In function ‘test_function’: | |
| foo.c:3:24: warning: unused parameter ‘i’ [-Wunused-parameter] | |
| foo.c: In function ‘main’: | |
| foo.c:11:1: warning: control reaches end of non-void function [-Wreturn-type] | |
| kristian@luke:~$ gcc -Wall -Wextra -Wmissing-prototypes foo.c | |
| foo.c:3:6: warning: no previous prototype for ‘test_function’ [-Wmissing-prototypes] | |
| foo.c: In function ‘test_function’: | |
| foo.c:3:24: warning: unused parameter ‘i’ [-Wunused-parameter] | |
| foo.c: In function ‘main’: | |
| foo.c:11:1: warning: control reaches end of non-void function [-Wreturn-type] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment