This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CYG_INSTRUMENT_CLOCK+PowerPC+FPU problem.


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.

> 
> 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.

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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]