I have mainly two kinds of compile warning:
1. implicit declaration of function
in a.c
, it has char *foo(char *ptr1, char *ptr2)
, in b.c
, some functions use this foo
function without any declaration, and I found seems compiler will treat the function foo
return value as integer, and even I can pass some variables less or more than foo
function declaration
2. enumerated type mixed with another type
My target chip is ARM11, it seems that even I don't solve these two kinds of compile warning, my program can run without any issues, but I believe it must have some risk behind these. Can anyone give me some good example that these two kinds of compile warning can cause some unexpected issues?
Meanwhile, if these two warnings have potential risk, why c compiler allow these kinds warning happen but not set them to error directly? any story behind?