LO build fails -Werror=stringop-truncation in _lex.c

julien2412 serval2412 at yahoo.fr
Thu Oct 4 06:29:07 UTC 2018


Hello,

On pc Debian x86-64 with master sources updated today + enable-dbgutil, I
got this:
/home/julien/lo/libreoffice/soltools/cpp/_lex.c: In function ‘setsource’:
/home/julien/lo/libreoffice/soltools/cpp/_lex.c:671:9: error: ‘strncpy’
output truncated before terminating nul copying as many bytes from a
string as its length [-Werror=stringop-truncation]
         strncpy((char *) s->inp, str, len);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/julien/lo/libreoffice/soltools/cpp/_lex.c:668:15: note: length
computed here
         len = strlen(str);
               ^~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: ***
[/home/julien/lo/libreoffice/solenv/gbuild/LinkTarget.mk:241:
/home/julien/lo/libreoffice/workdir/CObject/soltools/cpp/_lex.o] Error 1
make[1]: *** Attente des tâches non terminées....
make: *** [Makefile:286: build] Error 2

Any idea how to fix this?

Julien



--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html


More information about the LibreOffice mailing list