New warning on old function
Scott Kostyshak
skostysh at lyx.org
Sat Sep 24 18:51:17 UTC 2022
On Wed, Sep 21, 2022 at 08:10:54PM +0200, Kornel Benko wrote:
>
> /usr2/src/lyx/lyx-git/src/Paragraph.cpp:1931:1: warning: control reaches end of non-void
> function [-Wreturn-type]
>
> This is with gcc-12, compiled in debug mode.
It makes sense if the warning is only given in debug mode since I guess
the compiler cannot tell for sure that the control flow will never get
past the LASSERT. I wonder if it is because the required inlining
doesn't happen or a different reason?
In any case, does the attached patch fix it?
Is that the only warning you get with GCC-12 or are there more?
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-gcc-12-warning.patch
Type: text/x-diff
Size: 908 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220924/04fca36c/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220924/04fca36c/attachment-0001.asc>
More information about the lyx-devel
mailing list