New rule no prototypes in C sources Was: Re: Batch of Patches from Joel

Gedare Bloom gedare at rtems.org
Tue Oct 14 14:47:34 UTC 2014


On Tue, Oct 14, 2014 at 2:29 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> On 13/10/14 17:48, Joel Sherrill wrote:
>>
>>
>> On 10/13/2014 10:43 AM, Sebastian Huber wrote:
>>>
>>> On 10/13/2014 05:18 PM, Joel Sherrill wrote:
>>>>
>>>> NOTE: For defaults for weak symbols, I am just adding
>>>> a prototype to the C file.
>>>
>>> How do you then ensure that a non-weak implementation has the same
>>> signature?
>>>
>> Don't ask me. I didn't add any of these weak symbol options to any BSP.
>> I am only fixing warnings on existing code. :)
>
>
> Adding a prototype for a global function to the C file doesn't fix the
> warning.  It just silences the warning and obscures things.
>
+1
We should not have prototypes in C files.

This should be a rule. In fact, I have added such a convention:
http://www.rtems.org/wiki/index.php/Coding_Conventions#Language_and_Compiler

Any complaints should be raised.

-Gedare


More information about the devel mailing list