New warning on old function

Scott Kostyshak skostysh at lyx.org
Sun Sep 25 01:07:09 UTC 2022


On Sat, Sep 24, 2022 at 10:57:05PM +0200, Kornel Benko wrote:
> Am Sat, 24 Sep 2022 14:51:17 -0400
> schrieb Scott Kostyshak <skostysh at lyx.org>:
> 
> > 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
> 
> No warning now (as expected).

It's in at 725168ba. Do you see any other warnings with gcc-12?

Scott
-------------- 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/203c3bf9/attachment.asc>


More information about the lyx-devel mailing list