So this is a new warning in Xcode 12.5 (I believe) for old C style functions declared in those SDKs or any old style code using that syntax.
What does it mean?
do-not-leave-the-parameter-list-of-a-function-blank---use-void
if a function declaration does not include arguments, as in
double atof();, that too is taken to mean that nothing is to be assumed about the arguments of atof; all parameter checking is turned off. This special meaning of the empty argument list is intended to permit older C programs to compile with new compilers. But it's a bad idea to use it with new programs. If the function takes arguments, declare them; if it takes no arguments, use void.
So this is how your function prototype should look:
int foo(void);
And this is how the function definition should be:
int foo(void)
{
...
<statements>
...
return 1;
}
One advantage of using the above, over int foo() type of declaration (ie. without using the keyword void), is that the compiler can detect the error if you call your function using an erroneous statement like foo(42). This kind of a function call statement would not cause any errors if you leave the parameter list blank. The error would pass silently, undetected and the code would still execute.
What can we do?
May be raise a ticket for Firebase SDK to address (if there is not one already).
How big of a problem is this?
Depends on the implementation details. Could be as simple as replacing ()
with (void)
for all of these functions. Could be a little more involved as explained above otherwise.
Firebase team maintains the SDKs regularly and we should see a fix for this in an upcoming release soon.