|
From: | Paul Eggert |
Subject: | Re: [PATCH] careadlinkat: fix GCC 10 workaround |
Date: | Mon, 17 Aug 2020 09:04:21 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/17/20 7:40 AM, Bernhard Voelker wrote:
Currently, we can only get avoid the warning via GCC_LINT. Do you have another idea how to avoid it? E.g. referencing static memory instead of stack memory?
Static memory wouldn't be thread-safe or reentrant. I don't see any easy alternative, other than always using malloc but this function gets used quite a bit in some apps.
What's wrong with avoiding the problem via GCC_LINT?I suppose you could add -Wno-return-local-addr to your CFLAGS, but I don't recommend this as it's normally a useful warning.
[Prev in Thread] | Current Thread | [Next in Thread] |