On Tue, Aug 28, 2012 at 3:52 PM, Giuseppe Scrivano wrote:
> Mike Frysinger <[email protected]> writes:
>> On Monday 21 May 2012 19:05:59 Mike Frysinger wrote:
>>> The current cleanup_html_url code warns because it's marked static
>>> but no one calls it.  Reading the code base, we see it only gets
>>> called when DEBUG_MALLOC is defined, so change the static markings
>>> to check that ifdef.
>
> thanks for the patch, but I think these functions should not be defined
> as static.  It would be fine to guard static functions used in the same
> compilation unit but I prefer to define functions used from different
> files in any case.

the reason i guarded with the define is so that it doesn't get
included in the output when it isn't used.  if we built with
-f{data,function}-sections and linked with -Wl,--gc-sections, then
that would also fix this.

what do you think about updating configure.ac to automatically use
those flags in the toolchain (e.g. gcc) supported them ?  i could send
a patch.

a quick test shows:
            text    data     bss     dec
before: 374721  16604  25984  417309
after: 367067  16316  25824  409207
change: -7654  -288  -160  -8102 (overall: -2%)
-mike

Reply via email to