[Openec] unused functions

Paul Fox pgf at laptop.org
Fri Nov 5 18:38:33 EDT 2010


frieder wrote:
 > Hi Paul,
 > 
 > thanks for the good commenting of the Makefile!
 > The commit (*) mentions a lot of unused functions:
 > 
 > + DISABLEWARNING(6,16)
 > +# warning 6 is for overlapping declarations, 16 is for unused functions,
 > +# of which we seem to have a lot.

yes, i hadn't realized there were so many such functions.  i'm not sure
when we disabled that warning, but in previous versions of the EC code
we were more reluctant to make big source changes, since we weren't the
only maintainers.

 > 
 > This can be a problem for SDCC. While Keil has individual functions
 > as linkable objects (and thus the linker can remove unused functions)
 > the linker used with SDCC is presented with complete files as
 > linkable objects. (and thus cannot remove unused functions...)
 > 
 > Could you reenable warning 16 and then encapsulate unused functions
 > (not their prototypes) with #ifndef SDCC ... #endif?

yes, something like that was my plan.  richard's on vacation, and i
wanted to touch base with him first.

why not the prototypes?

paul

=---------------------
 paul fox, pgf at laptop.org


More information about the Openec mailing list