[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [PATCH] fix build warnings due to DEBUG_MALLOC
From: |
Mike Frysinger |
Subject: |
Re: [Bug-wget] [PATCH] fix build warnings due to DEBUG_MALLOC |
Date: |
Thu, 30 Aug 2012 20:07:13 -0400 |
On Tue, Aug 28, 2012 at 3:52 PM, Giuseppe Scrivano wrote:
> Mike Frysinger <address@hidden> 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