New warning on old function

Kornel Benko kornel at lyx.org
Sat Sep 24 20:57:05 UTC 2022


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).

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220924/d011514b/attachment.asc>


More information about the lyx-devel mailing list