[rtems commit] m68k/shared/misc/memProbe.c: Add prototype to eliminate warning

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jun 2 06:53:32 UTC 2014


On 2014-06-02 03:24, Joel Sherrill wrote:
>
> On Jun 1, 2014 8:00 PM, Gedare Bloom <gedare at rtems.org> wrote:
>  >
>  > On Sun, Jun 1, 2014 at 7:10 PM, Joel Sherrill <joel at rtems.org> wrote:
>  > > Module:    rtems
>  > > Branch:    master
>  > > Commit:    6ddc4dab2085e9db28b2470f05aaa54652d68a84
>  > > Changeset:
> http://git.rtems.org/rtems/commit/?id=6ddc4dab2085e9db28b2470f05aaa54652d68a84
>  > >
>  > > Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
>  > > Date:      Sun Jun  1 18:18:00 2014 -0500
>  > >
>  > > m68k/shared/misc/memProbe.c: Add prototype to eliminate warning
>  > >
>  > > ---
>  > >
>  > >  c/src/lib/libcpu/m68k/shared/misc/memProbe.c |    2 ++
>  > >  1 files changed, 2 insertions(+), 0 deletions(-)
>  > >
>  > > diff --git a/c/src/lib/libcpu/m68k/shared/misc/memProbe.c
> b/c/src/lib/libcpu/m68k/shared/misc/memProbe.c
>  > > index 5c52911..d352f76 100644
>  > > --- a/c/src/lib/libcpu/m68k/shared/misc/memProbe.c
>  > > +++ b/c/src/lib/libcpu/m68k/shared/misc/memProbe.c
>  > > @@ -4,6 +4,7 @@
>  > >
>  > >  #include <bsp.h>
>  > >  #include <string.h>
>  > > +#include <rtems/m68k/sim.h>
>  > >
>  > >  #if (M68K_COLDFIRE_ARCH == 1)
>  > >  # define EXCEPTION_FRAME_PC_OFFSET "4"
>  > > @@ -16,6 +17,7 @@ int memProbeByte(void *from, void *to);
>  > >  int memProbeShort(void *from, void *to);
>  > >  int memProbeLong(void *from, void *to);
>  > >  int memProbeCatcher(void);
>  > > +rtems_status_code bspExtMemProbe(void *addr, int write, int size, void
> *pval);
>  > >
>  > We should generally prefer to declare functions in a header file, or
>  > make them static if not exported.
>
> Got a suggestion? Did I miss an existing prototype?
>

I also think that adding prototypes to source files to silence this warning is 
not the right thing and makes it worse.

These functions seem to be unused.  So why not delete this file?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list