- 论坛徽章:
- 0
|
打开编译器的所有警告, 大部分为题都可以解决.
楼主的程序的编译结果:
cc -pedantic -Wall -Wno-long-long -Werror file_open.c -o file_open
cc1: warnings being treated as errors
file_open.c:4: warning: second argument of 'main' should be 'char **'
file_open.c: In function 'main':
file_open.c:10: warning: passing argument 1 of 'open' from incompatible pointer type
file_open.c:10: warning: suggest parentheses around assignment used as truth value
file_open.c:15: warning: implicit declaration of function 'read'
file_open.c:22: warning: implicit declaration of function 'close'
24行的程序: 4个警告. :em11: :em11: :em11: |
|