[PATCH] Re: New warning (or at least I only noticed it now)
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu Nov 9 17:21:03 UTC 2023
Le 08/11/2023 à 22:50, Pavel Sanda a écrit :
>> We have to do something for this annoying warning. What about the following?
>
> If it works why not. I stopped following that gcc bug, but last time I looked
> they gcc devs seemed convinced that false-positive ratio is small enough that
> they will not care anymore (despite of ongoing grivance from other projects).
> So the most appropriate response from our side seems to be just disable this
> warning...
Here is a new version of the patch that
* is more readable in the sources (+1),
* handles the three functions that cause trouble (+1),
* can be reused for the other annoying warning that we have (+1),
* but relies on #pragma magic (-1) and preprocessor dark magic (-1).
I tested it on latest gcc and clang, and on the slightly older versions
in Ubuntu 20.04.
I do not expect issues, except maybe on macOS and Windows compilers. The
worst that can happen is a compilation failure.
Thoughts?
JMarc
PS: I have to say that I learned a lot while making this thing work!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-dangling-reference-warning-in-several-places.patch
Type: text/x-patch
Size: 4375 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20231109/db9d511a/attachment.bin>
More information about the lyx-devel
mailing list