Skip to contentSkip to conversation

Fixing a couple warnings

PATCH In review Steve Dickson 1 participant 4 messages May 31, 2018 – Jun 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Fixing a couple warnings

Here are a couple warnings that I started getting when I compiled on a freshly install Fedora 28.

The first patch turns off the compiling of rpcgen by default. The command produces code that cause a number of warnings which are now errors.

The old glibc rpcgen, which is now in the rpcsvc-proto package, does a much better job of not creating warnings.

The second patch fixes a couple warnings I was not seeing.

Steve Dickson (1):
rpcgen: Only compile the command when configured.

gabriele balducci (1):
Fixed format overflow warnings in mountd and nfsd

 configure.ac          | 2 +-
 utils/mountd/mountd.c | 2 +-
 utils/nfsd/nfsd.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/2 rpcgen: Only compile the command when configured.

Only compile and use the internal rpcgen
when required via the --with-rpcgen flag

It is strongly suggested to use the rpcgen from
the new created rpcsvc-proto package be used.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 276dec3..4b698dd 100644
@@ -157,7 +157,7 @@ AC_ARG_WITH(rpcgen,
 	    RPCGEN_PATH=$rpcgen_path
 	fi
 	AC_SUBST(RPCGEN_PATH)
-	AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = ""])
+	AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = "internal"])
 AC_ARG_ENABLE(uuid,
 	[AC_HELP_STRING([--disable-uuid], 
 		[Exclude uuid support to avoid buggy libblkid. @<:@default=no@:>@])],
Signature · 1 line
2.17.0
#2 lore raw

PATCH 2/2 Fixed format overflow warnings in mountd and nfsd

In reply to Steve Dickson

From: gabriele balducci <[email protected]>

---
 utils/mountd/mountd.c | 2 +-
 utils/nfsd/nfsd.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
utils/mountd/mountd.c +1 -1
index 4c68702..086c39b 100644
@@ -702,7 +702,7 @@ main(int argc, char **argv)
 	else
 		NFSCTL_TCPUNSET(_rpcprotobits);
 	for (vers = 2; vers <= 4; vers++) {
-		char tag[10];
+		char tag[20];
 		sprintf(tag, "vers%d", vers);
 		if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers)))
 			NFSCTL_VERSET(nfs_version, vers);
utils/nfsd/nfsd.c +1 -1
index 2303a5d..f048631 100644
@@ -98,7 +98,7 @@ main(int argc, char **argv)
 	else
 		NFSCTL_TCPUNSET(protobits);
 	for (i = 2; i <= 4; i++) {
-		char tag[10];
+		char tag[20];
 		sprintf(tag, "vers%d", i);
 		if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i)))
 			NFSCTL_VERSET(versbits, i);
Signature · 1 line
2.17.0
#3 lore raw
In reply to Steve Dickson
Quoted 17 lines · Steve Dickson

Here are a couple warnings that I started getting when I compiled on a freshly install Fedora 28.

The first patch turns off the compiling of rpcgen by default. The command produces code that cause a number of warnings which are now errors.

The old glibc rpcgen, which is now in the rpcsvc-proto package, does a much better job of not creating warnings.

The second patch fixes a couple warnings I was not seeing.

Steve Dickson (1):
rpcgen: Only compile the command when configured.

Quoted 8 lines

gabriele balducci (1):
Fixed format overflow warnings in mountd and nfsd

 configure.ac          | 2 +-
 utils/mountd/mountd.c | 2 +-
 utils/nfsd/nfsd.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Committed...

steved.