[lkml]   [2018]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] x86/cpu: fix prototype warning

On Thu, 8 Nov 2018, Borislav Petkov wrote:

> And frankly, I don't see why we should be fixing all those. So what if a
> global function does't have a previous prototype declaration?!
> Micha, is there anything "useful" that warning bitches about or should
> we disable it?

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]


 \ /
  Last update: 2018-11-08 16:48    [W:0.167 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site