I need to compile some c source code, and there are a lot of K&R style function declarations in it like this:
static int
foo(bar) // no type info
char bar; // the type is declared here
{
return bar * 2;
}
I'm using Android Studio and CMakeLists to build these files, it complains that "Can't resolve type 'bar'", so I guess it cannot recognize K&R style function declarations.
Is there any way to resolve this kind of problem?
2018/05/10 Updated
At last, I found out that although Android Studio shows "Can't resolve type 'bar'" in red error messages, I can still run the project on an Android device with correct behavior. (The calculation result of K&R style functions are all correct)
My environment: