[rtems commit] virtex5/startup/dummy_console.c: Fix no prototype warning

Gedare Bloom gedare at rtems.org
Wed Apr 26 01:58:09 UTC 2017


On Tue, Apr 25, 2017 at 9:02 PM, Joel Sherrill <joel at rtems.org> wrote:
>
>
> On Tue, Apr 25, 2017 at 7:21 PM, Gedare Bloom <gedare at rtems.org> wrote:
>>
>> On Mon, Apr 24, 2017 at 6:21 PM, Joel Sherrill <joel at rtems.org> wrote:
>> > Module:    rtems
>> > Branch:    master
>> > Commit:    fd48b43007b001a6f31949952504c9b55d895c4f
>> > Changeset:
>> > http://git.rtems.org/rtems/commit/?id=fd48b43007b001a6f31949952504c9b55d895c4f
>> >
>> > Author:    Joel Sherrill <joel at rtems.org>
>> > Date:      Mon Apr 24 11:15:53 2017 -0500
>> >
>> > virtex5/startup/dummy_console.c: Fix no prototype warning
>> >
>> > ---
>> >
>> >  c/src/lib/libbsp/powerpc/virtex5/startup/dummy_console.c | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/c/src/lib/libbsp/powerpc/virtex5/startup/dummy_console.c
>> > b/c/src/lib/libbsp/powerpc/virtex5/startup/dummy_console.c
>> > index 048133d..e62a9f0 100644
>> > --- a/c/src/lib/libbsp/powerpc/virtex5/startup/dummy_console.c
>> > +++ b/c/src/lib/libbsp/powerpc/virtex5/startup/dummy_console.c
>> > @@ -26,6 +26,7 @@ rtems_device_driver
>> > console_control(rtems_device_major_number major,
>> >                                      rtems_device_minor_number minor,
>> >                                      void*                     arg);
>> >
>> > +void BSP_output_char(char ch);
>> >
>> Can we avoid declaring non-static functions in .c files? I would
>> either see this in a header file, or see it declared as a static
>> function.
>
>
> It can't be static because it is in another file and used by both.
>
> I suppose a bspimpl.h could be added if folks desire.
>
If a function is used in more than one source file, it should be
exported via a header file to all of them. (I think this can, and
should, be a rule.)

>>
>>
>> >  ssize_t __bsp_memory_write(int minor, const char* buf, size_t len)
>> >  {
>> >
>> > _______________________________________________
>> > vc mailing list
>> > vc at rtems.org
>> > http://lists.rtems.org/mailman/listinfo/vc
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>
>



More information about the devel mailing list