On Thu, Nov 08, 2018 at 03:47:32PM +0000, Michael Matz wrote:
> What tglx said.  If you don't intend such functions to be called 
> from other units make them static, if you do intend them to be callable 
> declare the properly.
> 
> [There's also one subtle issue with argument promotions.  prototypeless 
> functions are called as if they are declared "int name()" that is 
> default argument promotions take place (float->double, {char,short}->int), 
> which won't happen with prototypes, and argument type conversions won't 
> take place (as no parameter types are known).  This might lead to 
> different values between calling a prototyped and a prototype-less 
> function arriving at the function even though the call expression looked 
> the same]

Eww, that's yucky.

Ok, so we should enalbe this warning by default then. And doing that in
the main Makefile gives ~1400 warnings on an allmodconfig build.

Yi Wang, I guess you have a long road in front of you. :-)

Thx.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Reply via email to