People are getting errors about the following and removing -Wall and
-Werror from the make file due to suggestions I found using google.
discover.c patch fixes
----------------------------
discover.c:646:4: error: 'strncpy' output may be truncated copying 15 bytes
from a string of length 15 [-Werror=stringop-truncation]
strncpy(tmp->name, info.name, sizeof(tmp->name) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
parse.c patch fixes
----------------------------
parse.c: In function 'parse_warn':
parse.c:5577:44: error: '%s' directive output may be truncated writing up
to 1023 bytes into a region of size 1015 [-Werror=format-truncation=]
snprintf (fbuf, sizeof fbuf, "%s line %d: %s",
^~
cfile -> tlname, cfile -> lexline, mbuf);
~~~~
parse.c:5577:2: note: 'snprintf' output 10 or more bytes (assuming 1033)
into a destination of size 1024
snprintf (fbuf, sizeof fbuf, "%s line %d: %s",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cfile -> tlname, cfile -> lexline, mbuf);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dhcrelay.c patch fixes
----------------------------
dhcrelay.c: In function 'request_v4_interface':
dhcrelay.c:2122:9: error: 'strncpy' output truncated before terminating nul
copying as many bytes from a string as its length
[-Werror=stringop-truncation]
strncpy(tmp->name, name, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dhcrelay.c:2105:19: note: length computed here
int len = strlen(name);
^~~~~~~~~~~~
You'll only find the first one being mentioned on google because the fix
being suggested of removing -Wall and -Werror from the makefile obviously
mutes the other two. These errors are popping using LFS and BLFS
documentation as of today.
On Mon, Oct 1, 2018 at 12:16 AM Thomas Trepl <[email protected]>
wrote:
> Am Sonntag, den 30.09.2018, 23:06 -0400 schrieb Clayton Johnson via
> blfs-dev:
> > DHCP 4.4.1 broken in guide as of GCC 8 update.
> >
> > Attached patch will fix this issue.
>
> What do you mean by "broken"? What is the issue which gets fixed by that
> patch?
>
> dhcp compiles fine here with gcc-8.2.0.
>
> --
> Thomas
>
>
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page