nfs-utils-2.3.2: glitch crashes build
Subsystems (2)
hello
building 2.3.2 fails with:
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", vers);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
and
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", i);
^~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
I guess the reason is (https://marc.info/?l=linux-nfs&m=152718306728854&w=2):
* Most compile warnings are now fatal errors.
and (configure):
checking whether CC supports -Werror=format-overflow=2... yes
This fixes everything for me:
diff -c utils/mountd/mountd.c.FIX_VAR_DIM utils/mountd/mountd.c
*** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
--- utils/mountd/mountd.c Sun May 27 18:16:46 2018
***************
*** 702,708 ****
else
NFSCTL_TCPUNSET(_rpcprotobits);
for (vers = 2; vers <= 4; vers++) {
! char tag[10];
sprintf(tag, "vers%d", vers);
if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers)))
NFSCTL_VERSET(nfs_version, vers);
--- 702,708 ----
else
NFSCTL_TCPUNSET(_rpcprotobits);
for (vers = 2; vers <= 4; vers++) {
! char tag[20];
sprintf(tag, "vers%d", vers);
if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers)))
NFSCTL_VERSET(nfs_version, vers);
diff -c utils/nfsd/nfsd.c.FIX_VAR_DIM utils/nfsd/nfsd.c
*** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
--- utils/nfsd/nfsd.c Sun May 27 18:16:46 2018
***************
*** 98,104 ****
else
NFSCTL_TCPUNSET(protobits);
for (i = 2; i <= 4; i++) {
! char tag[10];
sprintf(tag, "vers%d", i);
if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i)))
NFSCTL_VERSET(versbits, i);
--- 98,104 ----
else
NFSCTL_TCPUNSET(protobits);
for (i = 2; i <= 4; i++) {
! char tag[20];
sprintf(tag, "vers%d", i);
if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i)))
NFSCTL_VERSET(versbits, i);I thought the maintainers might be interested in fixing upstream
ciao
gabriele
Hello gabriele
I wonder why I am not seeing these warnings...
Thank you very much for the patch... Would you
mind if I added a
to the official patch?
steved.
Quoted 80 lines · gabriele balducci
hello
building 2.3.2 fails with:
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", vers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
and
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
I guess the reason is (https://marc.info/?l=linux-nfs&m=152718306728854&w=2):
* Most compile warnings are now fatal errors.
and (configure):
checking whether CC supports -Werror=format-overflow=2... yes
This fixes everything for me:
diff -c utils/mountd/mountd.c.FIX_VAR_DIM utils/mountd/mountd.c *** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018 --- utils/mountd/mountd.c Sun May 27 18:16:46 2018 *************** *** 702,708 **** else NFSCTL_TCPUNSET(_rpcprotobits); for (vers = 2; vers <= 4; vers++) { ! char tag[10]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers))) NFSCTL_VERSET(nfs_version, vers); --- 702,708 ---- else NFSCTL_TCPUNSET(_rpcprotobits); for (vers = 2; vers <= 4; vers++) { ! char tag[20]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers))) NFSCTL_VERSET(nfs_version, vers); diff -c utils/nfsd/nfsd.c.FIX_VAR_DIM utils/nfsd/nfsd.c *** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018 --- utils/nfsd/nfsd.c Sun May 27 18:16:46 2018 *************** *** 98,104 **** else NFSCTL_TCPUNSET(protobits); for (i = 2; i <= 4; i++) { ! char tag[10]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) NFSCTL_VERSET(versbits, i); --- 98,104 ---- else NFSCTL_TCPUNSET(protobits); for (i = 2; i <= 4; i++) { ! char tag[20]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) NFSCTL_VERSET(versbits, i);I thought the maintainers might be interested in fixing upstream
ciao
gabriele
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Steve Dickson
=20
Hello gabriele
=20
I wonder why I am not seeing these warnings...=20
fwiw, upstream nfs-utils no longer builds on RHEL 7 latest. The recent commit that turned some compiler warnings into errors causes a bunch of build failures on that platform.
In particular, %m is not portable, and it is used all over in xlog, printf, and scanf formatting strings.
Quoted 13 lines
Thank you very much for the patch... Would you
mind if I added a=20Signed-off-by gabriele balducci <[email protected]>=20
to the official patch?=20
=20
steved.Quoted 5 lines · gabriele balducci
hello
=20
building 2.3.2 fails with:
=20
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes into a =
destination of size 10
Quoted 7 lines
Quoted 7 lines
sprintf(tag, "vers%d", vers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
=20
and
=20
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into a =
destination of size 10
Quoted 5 lines
Quoted 5 lines
sprintf(tag, "vers%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
=20
I guess the reason is =
(https://marc.info/?l=3Dlinux-nfs&m=3D152718306728854&w=3D2):
Quoted 12 lines
Quoted 12 lines
=20
* Most compile warnings are now fatal errors.
=20
and (configure):
=20
checking whether CC supports -Werror=3Dformat-overflow=3D2... yes
=20
This fixes everything for me:
=20
diff -c utils/mountd/mountd.c.FIX_VAR_DIMutils/mountd/mountd.c
*** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/mountd/mountd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
***************
*** 702,708 ****else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[10]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(nfs_version, vers); --- 702,708 ---- else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[20]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 7 lines
Quoted 7 lines
NFSCTL_VERSET(nfs_version, vers);=20
=20
=20
diff -c utils/nfsd/nfsd.c.FIX_VAR_DIMutils/nfsd/nfsd.c
*** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/nfsd/nfsd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
***************
*** 98,104 ****else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[10]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(versbits, i); --- 98,104 ---- else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[20]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 9 lines
Quoted 9 lines
NFSCTL_VERSET(versbits, i);=20
=20
I thought the maintainers might be interested in fixing upstream =20
ciao
gabriele
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
Quoted 5 lines
Quoted 3 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
=20--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chuck Lever
Quoted 11 lines · Chuck Lever
Quoted 7 lines · Steve Dickson
Hello gabriele
I wonder why I am not seeing these warnings...
fwiw, upstream nfs-utils no longer builds on RHEL 7 latest. The recent commit that turned some compiler warnings into errors causes a bunch of build failures on that platform.
Yeah I know.... It was suggested to me by some glibc guys.... I figured there would be some pain....
I'll looking the rhel7 issue..
steved.
Quoted 103 lines
In particular, %m is not portable, and it is used all over in xlog, printf, and scanf formatting strings.
Quoted 88 lines
Thank you very much for the patch... Would you
mind if I added aSigned-off-by gabriele balducci <[email protected]>to the official patch?
steved.
Quoted 71 lines · gabriele balducci
hello
building 2.3.2 fails with:
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", vers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
and
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
I guess the reason is (https://marc.info/?l=linux-nfs&m=152718306728854&w=2):
* Most compile warnings are now fatal errors.
and (configure):
checking whether CC supports -Werror=format-overflow=2... yes
This fixes everything for me:
diff -c utils/mountd/mountd.c.FIX_VAR_DIM
utils/mountd/mountd.c
*** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/mountd/mountd.cSun May 27 18:16:46 2018
***************
*** 702,708 ****else NFSCTL_TCPUNSET(_rpcprotobits); for (vers = 2; vers <= 4; vers++) { ! char tag[10]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers))) NFSCTL_VERSET(nfs_version, vers); --- 702,708 ---- else NFSCTL_TCPUNSET(_rpcprotobits); for (vers = 2; vers <= 4; vers++) { ! char tag[20]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers))) NFSCTL_VERSET(nfs_version, vers);diff -c utils/nfsd/nfsd.c.FIX_VAR_DIM
utils/nfsd/nfsd.c
*** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/nfsd/nfsd.cSun May 27 18:16:46 2018
***************
*** 98,104 ****else NFSCTL_TCPUNSET(protobits); for (i = 2; i <= 4; i++) { ! char tag[10]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) NFSCTL_VERSET(versbits, i); --- 98,104 ---- else NFSCTL_TCPUNSET(protobits); for (i = 2; i <= 4; i++) { ! char tag[20]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) NFSCTL_VERSET(versbits, i);Quoted 9 lines
I thought the maintainers might be interested in fixing upstream
ciao
gabriele
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Chuck Lever
Quoted 10 lines · Steve Dickson
=20
=20
=20Quoted 3 lines · Chuck Lever
=20
=20Quoted 1 line
On May 31, 2018, at 11:13 AM, Steve Dickson <[email protected]> =
Quoted 9 lines · wrote:
Quoted 8 lines
Quoted 4 lines
=20
Hello gabriele
=20
I wonder why I am not seeing these warnings...=20=20
fwiw, upstream nfs-utils no longer builds on RHEL 7 latest. The recent commit that turned some compiler warnings into errors causes a bunch of build failures on that platform.Yeah I know....
Cool, this was just an fyi.
Quoted 25 lines
It was suggested to me by some glibc guys.... I figured there would be some pain....=20 =20
I'll looking the rhel7 issue..=20
=20
steved.
=20Quoted 18 lines
=20
In particular, %m is not portable, and it is used all over in xlog, printf, and scanf formatting strings. =20
=20Quoted 13 lines
Thank you very much for the patch... Would you
mind if I added a=20Signed-off-by gabriele balducci <[email protected]>=20
to the official patch?=20
=20
steved.Quoted 5 lines · gabriele balducci
hello
=20
building 2.3.2 fails with:
=20
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes into =
a destination of size 10
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
sprintf(tag, "vers%d", vers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
=20
and
=20
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into a =
destination of size 10
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
sprintf(tag, "vers%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
=20
I guess the reason is =
(https://marc.info/?l=3Dlinux-nfs&m=3D152718306728854&w=3D2):
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
=20
* Most compile warnings are now fatal errors.
=20
and (configure):
=20
checking whether CC supports -Werror=3Dformat-overflow=3D2... yes =20
This fixes everything for me:
=20
diff -c utils/mountd/mountd.c.FIX_VAR_DIMutils/mountd/mountd.c
*** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/mountd/mountd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
***************
*** 702,708 ****else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[10]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(nfs_version, vers); --- 702,708 ---- else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[20]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
NFSCTL_VERSET(nfs_version, vers);=20
=20
=20
diff -c utils/nfsd/nfsd.c.FIX_VAR_DIMutils/nfsd/nfsd.c
*** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/nfsd/nfsd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
***************
*** 98,104 ****else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[10]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(versbits, i); --- 98,104 ---- else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[20]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
NFSCTL_VERSET(versbits, i);=20
=20
I thought the maintainers might be interested in fixing upstream =20
ciao
gabriele
--
To unsubscribe from this list: send the line "unsubscribe =
linux-nfs" in
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
=20--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html=20
--
Chuck Lever
=20
=20
=20
--
Chuck Lever
Quoted 13 lines · Chuck Lever
Quoted 13 lines · Steve Dickson
Quoted 6 lines · Chuck Lever
Quoted 6 lines · Steve Dickson
Hello gabriele
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
I wonder why I am not seeing these warnings...
fwiw, upstream nfs-utils no longer builds on RHEL 7 latest. The recent commit that turned some compiler warnings into errors causes a bunch of build failures on that platform.
Yeah I know....
Cool, this was just an fyi.
Question what gcc are you using?
The one I'm using 'gcc-4.8.5 does not support
checking whether CC supports -Werror=format-overflow=2... no checking whether CC supports -Werror=int-conversion... no checking whether CC supports -Werror=incompatible-pointer-types... no checking whether CC supports -Werror=misleading-indentation... no
steved.
Quoted 118 lines
Quoted 112 lines
It was suggested to me by some glibc
guys.... I figured there would be some pain....I'll looking the rhel7 issue..
steved.
Quoted 103 lines
In particular, %m is not portable, and it is used all over in xlog, printf, and scanf formatting strings.
Quoted 88 lines
Thank you very much for the patch... Would you
mind if I added aSigned-off-by gabriele balducci <[email protected]>to the official patch?
steved.
Quoted 71 lines · gabriele balducci
hello
building 2.3.2 fails with:
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", vers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
and
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into a destination of size 10
sprintf(tag, "vers%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
I guess the reason is (https://marc.info/?l=linux-nfs&m=152718306728854&w=2):
* Most compile warnings are now fatal errors.
and (configure):
checking whether CC supports -Werror=format-overflow=2... yes
This fixes everything for me:
diff -c utils/mountd/mountd.c.FIX_VAR_DIM
utils/mountd/mountd.c
*** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/mountd/mountd.cSun May 27 18:16:46 2018
***************
*** 702,708 ****else NFSCTL_TCPUNSET(_rpcprotobits); for (vers = 2; vers <= 4; vers++) { ! char tag[10]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers))) NFSCTL_VERSET(nfs_version, vers); --- 702,708 ---- else NFSCTL_TCPUNSET(_rpcprotobits); for (vers = 2; vers <= 4; vers++) { ! char tag[20]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers))) NFSCTL_VERSET(nfs_version, vers);diff -c utils/nfsd/nfsd.c.FIX_VAR_DIM
utils/nfsd/nfsd.c
*** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/nfsd/nfsd.cSun May 27 18:16:46 2018
***************
*** 98,104 ****else NFSCTL_TCPUNSET(protobits); for (i = 2; i <= 4; i++) { ! char tag[10]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) NFSCTL_VERSET(versbits, i); --- 98,104 ---- else NFSCTL_TCPUNSET(protobits); for (i = 2; i <= 4; i++) { ! char tag[20]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) NFSCTL_VERSET(versbits, i);Quoted 9 lines
I thought the maintainers might be interested in fixing upstream
ciao
gabriele
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Chuck Lever--
Chuck Lever
Quoted 10 lines · Steve Dickson
=20
=20
=20Quoted 3 lines · Chuck Lever
=20
=20Quoted 1 line
On May 31, 2018, at 12:40 PM, Steve Dickson <[email protected]> =
Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines
=20
=20
=20Quoted 3 lines · Chuck Lever
=20
=20Quoted 1 line
On May 31, 2018, at 11:13 AM, Steve Dickson <[email protected]> =
Quoted 9 lines · wrote:
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
=20
Hello gabriele
=20
I wonder why I am not seeing these warnings...=20=20
fwiw, upstream nfs-utils no longer builds on RHEL 7 latest. The recent commit that turned some compiler warnings into errors causes a bunch of build failures on that platform.Yeah I know....
Quoted 8 lines
Quoted 2 lines
=20
Cool, this was just an fyi.Question what gcc are you using?=20
=20
The one I'm using 'gcc-4.8.5 does not support
checking whether CC supports -Werror=3Dformat-overflow=3D2... no checking whether CC supports -Werror=3Dint-conversion... no checking whether CC supports -Werror=3Dincompatible-pointer-types... =
no
Quoted 1 line
checking whether CC supports -Werror=3Dmisleading-indentation... no
Neighborhood power outage today, so no access to my lab systems. I don't believe I have a special version of gcc.
However, here's my build script:
142 /usr/bin/make distclean 143 /bin/sh autogen.sh 144 ./configure \ 145 CFLAGS=3D"-D_FILE_OFFSET_BITS=3D64 = -Wp,-D_FORTIFY_SOURCE=3D2 \ 146 -Os -Wall -Wextra -pedantic -std=3Dc99 \ 147 -Wformat=3D2 -Wmissing-include-dirs \ 148 -Wunused -Wconversion -Wlogical-op \ 149 -Wmissing-prototypes -Wmissing-declarations =
-Wstrict-prototypes \
150 -Wmissing-noreturn -Wshadow \
151 -Wunreachable-code -Winline -Wdisabled-optimization =
\
152 -Wstrict-aliasing=3D2 -Wstrict-overflow=3D4 =
-Wstack-protector \
153 -fstrict-aliasing -fstrict-overflow \ 154 -fexceptions -fstack-protector \ 155 -fasynchronous-unwind-tables -fpie" \ 156 LDFLAGS=3D"-pie" \ 157 --enable-uuid --enable-mount --enable-nfsv4 =
--enable-gss \
158 --enable-mountconfig =
--with-statdpath=3D/var/lib/nfs/statd \
159 --enable-nfsdcltrack --enable-tirpc --enable-ipv6
It's possible I've got something enabled that is
triggering heartburn.
I seem to recall I removed "-pedantic -std=3Dc99" and still had some problems, but I could be misremembering.
Quoted 28 lines
steved.
Quoted 27 lines
=20
=20Quoted 25 lines
It was suggested to me by some glibc guys.... I figured there would be some pain....=20 =20
I'll looking the rhel7 issue..=20
=20
steved.
=20Quoted 18 lines
=20
In particular, %m is not portable, and it is used all over in xlog, printf, and scanf formatting strings. =20
=20Quoted 13 lines
Thank you very much for the patch... Would you mind if I added a=20
Signed-off-by gabriele balducci <[email protected]>=20
to the official patch?=20
=20
steved.Quoted 5 lines · gabriele balducci
hello
=20
building 2.3.2 fails with:
=20
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes =
into a destination of size 10
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
sprintf(tag, "vers%d", vers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
=20
and
=20
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into =
a destination of size 10
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
sprintf(tag, "vers%d", i);
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
=20
I guess the reason is =
(https://marc.info/?l=3Dlinux-nfs&m=3D152718306728854&w=3D2):
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
=20
* Most compile warnings are now fatal errors.
=20
and (configure):
=20
checking whether CC supports -Werror=3Dformat-overflow=3D2... yes =20
This fixes everything for me:
=20
diff -c utils/mountd/mountd.c.FIX_VAR_DIMutils/mountd/mountd.c
*** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/mountd/mountd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
***************
*** 702,708 ****else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[10]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(nfs_version, vers); --- 702,708 ---- else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[20]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
NFSCTL_VERSET(nfs_version, vers);=20
=20
=20
diff -c utils/nfsd/nfsd.c.FIX_VAR_DIMutils/nfsd/nfsd.c
*** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/nfsd/nfsd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
***************
*** 98,104 ****else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[10]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(versbits, i); --- 98,104 ---- else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[20]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
NFSCTL_VERSET(versbits, i);=20
=20
I thought the maintainers might be interested in fixing upstream =20
ciao
gabriele
--
To unsubscribe from this list: send the line "unsubscribe =
linux-nfs" in
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
the body of a message to [email protected] More majordomo info at =
http://vger.kernel.org/majordomo-info.html
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
=20
--
To unsubscribe from this list: send the line "unsubscribe =
linux-nfs" in
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html=20
--
Chuck Lever
=20
=20
=20
Quoted 8 lines
Quoted 6 lines
=20
--
Chuck Lever
=20
=20
=20--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chuck Lever
Quoted 3 lines
On May 31, 2018, at 1:22 PM, Chuck Lever <[email protected]> =
Quoted 11 lines · wrote:
=20
=20
=20Quoted 8 lines · Steve Dickson
=20
=20
=20Quoted 3 lines · Chuck Lever
=20
=20Quoted 1 line
On May 31, 2018, at 12:40 PM, Steve Dickson <[email protected]> =
Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
=20
=20
=20Quoted 3 lines · Chuck Lever
=20
=20Quoted 1 line
On May 31, 2018, at 11:13 AM, Steve Dickson <[email protected]> =
Quoted 9 lines · wrote:
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
=20
Hello gabriele
=20
I wonder why I am not seeing these warnings...=20=20
fwiw, upstream nfs-utils no longer builds on RHEL 7 latest. The recent commit that turned some compiler warnings into errors causes a bunch of build failures on that platform.Yeah I know....
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
=20
Cool, this was just an fyi.Question what gcc are you using?=20
=20
The one I'm using 'gcc-4.8.5 does not support
checking whether CC supports -Werror=3Dformat-overflow=3D2... no checking whether CC supports -Werror=3Dint-conversion... no checking whether CC supports -Werror=3Dincompatible-pointer-types... =
no
Quoted 1 line
Quoted 1 line
checking whether CC supports -Werror=3Dmisleading-indentation... no
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28.0.1) (GCC)=20
Quoted 9 lines
Neighborhood power outage today, so no access to my lab systems. I don't believe I have a special version of gcc. =20
However, here's my build script:
=20142 /usr/bin/make distclean 143 /bin/sh autogen.sh 144 ./configure \145 CFLAGS=3D"-D_FILE_OFFSET_BITS=3D64 =
-Wp,-D_FORTIFY_SOURCE=3D2 \
Quoted 4 lines
146 -Os -Wall -Wextra -pedantic -std=3Dc99 \ 147 -Wformat=3D2 -Wmissing-include-dirs \ 148 -Wunused -Wconversion -Wlogical-op \ 149 -Wmissing-prototypes -Wmissing-declarations =
-Wstrict-prototypes \
Quoted 2 lines
150 -Wmissing-noreturn -Wshadow \
151 -Wunreachable-code -Winline =
-Wdisabled-optimization \
Quoted 1 line
152 -Wstrict-aliasing=3D2 -Wstrict-overflow=3D4 =
-Wstack-protector \
Quoted 5 lines
153 -fstrict-aliasing -fstrict-overflow \ 154 -fexceptions -fstack-protector \ 155 -fasynchronous-unwind-tables -fpie" \ 156 LDFLAGS=3D"-pie" \ 157 --enable-uuid --enable-mount --enable-nfsv4 =
--enable-gss \
Quoted 1 line
158 --enable-mountconfig =
--with-statdpath=3D/var/lib/nfs/statd \
Quoted 37 lines
159 --enable-nfsdcltrack --enable-tirpc --enable-ipv6
=20
It's possible I've got something enabled that is triggering heartburn.
=20
I seem to recall I removed "-pedantic -std=3Dc99" and still had some problems, but I could be misremembering. =20
=20Quoted 28 lines
steved.
Quoted 27 lines
=20
=20Quoted 25 lines
It was suggested to me by some glibc guys.... I figured there would be some pain....=20 =20
I'll looking the rhel7 issue..=20
=20
steved.
=20Quoted 18 lines
=20
In particular, %m is not portable, and it is used all over in xlog, printf, and scanf formatting strings. =20
=20Quoted 13 lines
Thank you very much for the patch... Would you mind if I added a=20
Signed-off-by gabriele balducci <[email protected]>=20
to the official patch?=20
=20
steved.Quoted 5 lines · gabriele balducci
hello
=20
building 2.3.2 fails with:
=20
mountd.c:706:3: note: 'sprintf' output between 6 and 16 bytes =
into a destination of size 10
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
sprintf(tag, "vers%d", vers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
=20
and
=20
nfsd.c:102:3: note: 'sprintf' output between 6 and 16 bytes into =
a destination of size 10
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
sprintf(tag, "vers%d", i);
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
=20
I guess the reason is =
(https://marc.info/?l=3Dlinux-nfs&m=3D152718306728854&w=3D2):
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
=20
* Most compile warnings are now fatal errors.
=20
and (configure):
=20
checking whether CC supports -Werror=3Dformat-overflow=3D2... =
yes
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
=20
This fixes everything for me:
=20
diff -c utils/mountd/mountd.c.FIX_VAR_DIMutils/mountd/mountd.c
*** utils/mountd/mountd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/mountd/mountd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
***************
*** 702,708 ****else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[10]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(nfs_version, vers); --- 702,708 ---- else NFSCTL_TCPUNSET(_rpcprotobits); for (vers =3D 2; vers <=3D 4; vers++) { ! char tag[20]; sprintf(tag, "vers%d", vers); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(nfs_version, vers)))
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
NFSCTL_VERSET(nfs_version, vers);=20
=20
=20
diff -c utils/nfsd/nfsd.c.FIX_VAR_DIMutils/nfsd/nfsd.c
*** utils/nfsd/nfsd.c.FIX_VAR_DIM Sun May 27 18:16:46 2018
---utils/nfsd/nfsd.cSun May 27 18:16:46 2018
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
***************
*** 98,104 ****else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[10]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
NFSCTL_VERSET(versbits, i); --- 98,104 ---- else NFSCTL_TCPUNSET(protobits); for (i =3D 2; i <=3D 4; i++) { ! char tag[20]; sprintf(tag, "vers%d", i); if (conf_get_bool("nfsd", tag, =
NFSCTL_VERISSET(versbits, i)))
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
NFSCTL_VERSET(versbits, i);=20
=20
I thought the maintainers might be interested in fixing upstream =20
ciao
gabriele
--
To unsubscribe from this list: send the line "unsubscribe =
linux-nfs" in
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
the body of a message to [email protected] More majordomo info at =
http://vger.kernel.org/majordomo-info.html
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
=20
--
To unsubscribe from this list: send the line "unsubscribe =
linux-nfs" in
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
the body of a message to [email protected] More majordomo info at =
http://vger.kernel.org/majordomo-info.html
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
=20
--
Chuck Lever
=20
=20
=20
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
=20
--
Chuck Lever
=20
=20
=20--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
Quoted 10 lines
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html=20
--
Chuck Lever
=20
=20
=20
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chuck Lever