[ECOS] CYG_INSTRUMENT_CLOCK+PowerPC+FPU problem.

Sergei Organov osv@javad.ru
Thu May 4 09:38:00 GMT 2000


Nick Garnett <nickg@cygnus.co.uk> writes:

> Sergei Organov <osv@javad.ru> writes:
> 
> [CYG_UNUSED_PARAM leaves unneeded code]
> 
> > Well, I've tried to remove all the CYG_UNUSED_PARAM from all the macros in the
> > 'instrmnt.h', and got only one compiler warning related to the
> > CYG_INSTRUMENT_INTR macro. Thus I left only this macro to be like this:
> > 
> > #define CYG_INSTRUMENT_INTR(_event_,_arg1_,_arg2_)              \
> >     CYG_MACRO_START                                             \
> >     CYG_UNUSED_PARAM(CYG_ADDRWORD, (CYG_ADDRWORD)(_arg1_));     \
> >     CYG_MACRO_END
> 
> Which invocation of this macro causes this? The simple solution is to
> add a call to CYG_UNUSED_PARAM() just before the instrumentation macro
> call and get rid of the call in the macro.

I don't remember, somewhere in the kernel code. I believe you will see 
it after removing CYG_UNUSED_PARAM in the macro.

> 
> > 
> > Now there are no compiler warnings and no unnecessary loads in the code.
> > 
> > Do I submit the patch, or is there a better solution for the problem?
> > 
> 
> Having thought about this and discussed this amongst ourselves we
> think that removing the CYG_UNUSED_PARAM calls is probably the best
> solution.
> 
> The CYG_UNUSED_PARAM calls were only added about year ago to fix some
> compiler warnings (not by me, so I do not know which platform this
> was). So we will just be backing out the change. We may need to add
> some call to CYG_UNUSED_PARAM in various places to dispose of the
> compiler warnings.
>

This seems to be the most reasonable solution for me as well. It's indeed much
easier to fix compiler warnings where they appear (not a lot of places, I
believe) than to find what I've found :-)

> 
> The changes needed here seem to be fairly trivial, so there probably
> is no need for you to send us a patch.

OK, I'll wait until it appears in anon cvs and then revert to the cvs version.

BR,
Sergei.

> -- 
> Nick Garnett
> Cygnus Solutions, a Red Hat Company
> Cambridge, UK



More information about the Ecos-discuss mailing list