[PATCH] Silence -O3 -Wall warning in malloc/hooks.c with GCC 7 [BZ #22052]
H.J. Lu
hjl.tools@gmail.com
Sun Sep 3 16:30:00 GMT 2017
On Sun, Sep 3, 2017 at 8:48 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Aug 31, 2017 at 10:01 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 08/31/2017 05:55 AM, H.J. Lu wrote:
>>
>>> One of malloc change caused:
>>>
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=22052
>>
>> (uninit warning with -O3)
>>
>> I have not yet found a good way to suppress this. I don't know yet why
>> GCC loses the information that the maybe_p variable is initialized if
>> mem2chunk_check returns a non-null pointer.
>>
>
> This patch works for me. OK for master?
>
FYI, I opened a GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82090
--
H.J.
More information about the Libc-alpha
mailing list