Skip to contentSkip to conversation

bump rpcgen version and silence some warning

PATCH In review Giulio Benetti 3 participants 10 messages Jan 13, 2020 – Jan 19, 2020

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

cover bump rpcgen version and silence some warning

Giulio Benetti (3):
rpcgen: bump to latest version
rpcgen: rpc_cout: silence format-nonliteral
support: nfs: rpc_socket: silence unused parameter warning on salen

 support/nfs/rpc_socket.c   |    2 +
 tools/rpcgen/Makefile.am   |   24 +-
 tools/rpcgen/proto.h       |   65 ++
 tools/rpcgen/rpc_clntout.c |  458 +++++---
 tools/rpcgen/rpc_cout.c    | 1269 ++++++++++++----------
 tools/rpcgen/rpc_hout.c    |  915 +++++++++-------
 tools/rpcgen/rpc_main.c    | 2083 +++++++++++++++++++++---------------
 tools/rpcgen/rpc_parse.c   | 1055 +++++++++---------
 tools/rpcgen/rpc_parse.h   |  103 +-
 tools/rpcgen/rpc_sample.c  |  465 ++++----
 tools/rpcgen/rpc_scan.c    |  812 +++++++-------
 tools/rpcgen/rpc_scan.h    |   91 +-
 tools/rpcgen/rpc_svcout.c  | 1647 +++++++++++++++-------------
 tools/rpcgen/rpc_tblout.c  |  265 ++---
 tools/rpcgen/rpc_util.c    |  656 ++++++------
 tools/rpcgen/rpc_util.h    |  170 ++-
 tools/rpcgen/rpcgen.1      |  442 ++++++++
 17 files changed, 6123 insertions(+), 4399 deletions(-)
 create mode 100644 tools/rpcgen/proto.h
 create mode 100644 tools/rpcgen/rpcgen.1
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/3 rpcgen: rpc_cout: silence format-nonliteral

Silence format-nonliteral warning with #pragma GCC diagnostic ignored.

---
 tools/rpcgen/rpc_cout.c | 2 ++
 1 file changed, 2 insertions(+)
tools/rpcgen/rpc_cout.c +2 -0
index db7b571b..4627110d 100644
@@ -353,6 +353,7 @@ emit_program (const definition * def)
       }
 }
 
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 static void
 emit_union (const definition * def)
 {
@@ -430,6 +431,7 @@ emit_union (const definition * def)
 
   f_print (fout, "\t}\n");
 }
+#pragma GCC diagnostic warning "-Wformat-nonliteral"
 
 static void
 inline_struct (definition *def, int flag)
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/3 support: nfs: rpc_socket: silence unused parameter warning on salen

In reply to Giulio Benetti

If HAVE_LIBTIRPC is not defined salen parameter is unused and not taken into account, so compiler emits warning. Add a (void) salen; in that case.

---
 support/nfs/rpc_socket.c | 2 ++
 1 file changed, 2 insertions(+)
support/nfs/rpc_socket.c +2 -0
index bdf6d2f6..5fabf5a1 100644
@@ -77,6 +77,8 @@ static CLIENT *nfs_get_localclient(const struct sockaddr *sap,
 		.len		= (size_t)salen,
 		.buf		= &address,
 	};
+#else
+	(void) salen;
 #endif	/* HAVE_LIBTIRPC */
 	CLIENT *client;
 	int sock;
Signature · 1 line
2.20.1
#3 lore raw
In reply to Giulio Benetti
Quoted 17 lines · Giulio Benetti

Giulio Benetti (3):
rpcgen: bump to latest version
rpcgen: rpc_cout: silence format-nonliteral
support: nfs: rpc_socket: silence unused parameter warning on salen

 support/nfs/rpc_socket.c   |    2 +
 tools/rpcgen/Makefile.am   |   24 +-
 tools/rpcgen/proto.h       |   65 ++
 tools/rpcgen/rpc_clntout.c |  458 +++++---
 tools/rpcgen/rpc_cout.c    | 1269 ++++++++++++----------
 tools/rpcgen/rpc_hout.c    |  915 +++++++++-------
 tools/rpcgen/rpc_main.c    | 2083 +++++++++++++++++++++---------------
 tools/rpcgen/rpc_parse.c   | 1055 +++++++++---------
 tools/rpcgen/rpc_parse.h   |  103 +-
 tools/rpcgen/rpc_sample.c  |  465 ++++----
 tools/rpcgen/rpc_scan.c    |  812 +++++++-------
 tools/rpcgen/rpc_scan.h    |   91 +-
Quoted 9 lines
 tools/rpcgen/rpc_svcout.c  | 1647 +++++++++++++++-------------
 tools/rpcgen/rpc_tblout.c  |  265 ++---
 tools/rpcgen/rpc_util.c    |  656 ++++++------
 tools/rpcgen/rpc_util.h    |  170 ++-
 tools/rpcgen/rpcgen.1      |  442 ++++++++
 17 files changed, 6123 insertions(+), 4399 deletions(-)
 create mode 100644 tools/rpcgen/proto.h
 create mode 100644 tools/rpcgen/rpcgen.1

Committed... (tag nfs-utils-2-4-3-rc5)... Nice work!!!

steved.

#4 lore raw
Quoted 29 lines · Steve Dickson
Quoted 23 lines · Giulio Benetti

Giulio Benetti (3):
rpcgen: bump to latest version
rpcgen: rpc_cout: silence format-nonliteral
support: nfs: rpc_socket: silence unused parameter warning on salen

  support/nfs/rpc_socket.c   |    2 +
  tools/rpcgen/Makefile.am   |   24 +-
  tools/rpcgen/proto.h       |   65 ++
  tools/rpcgen/rpc_clntout.c |  458 +++++---
  tools/rpcgen/rpc_cout.c    | 1269 ++++++++++++----------
  tools/rpcgen/rpc_hout.c    |  915 +++++++++-------
  tools/rpcgen/rpc_main.c    | 2083 +++++++++++++++++++++---------------
  tools/rpcgen/rpc_parse.c   | 1055 +++++++++---------
  tools/rpcgen/rpc_parse.h   |  103 +-
  tools/rpcgen/rpc_sample.c  |  465 ++++----
  tools/rpcgen/rpc_scan.c    |  812 +++++++-------
  tools/rpcgen/rpc_scan.h    |   91 +-
  tools/rpcgen/rpc_svcout.c  | 1647 +++++++++++++++-------------
  tools/rpcgen/rpc_tblout.c  |  265 ++---
  tools/rpcgen/rpc_util.c    |  656 ++++++------
  tools/rpcgen/rpc_util.h    |  170 ++-
  tools/rpcgen/rpcgen.1      |  442 ++++++++
  17 files changed, 6123 insertions(+), 4399 deletions(-)
Quoted 3 lines

create mode 100644 tools/rpcgen/proto.h
create mode 100644 tools/rpcgen/rpcgen.1

Quoted 1 line

Committed... (tag nfs-utils-2-4-3-rc5)... Nice work!!!

Wooho! Thank you :-)

As soon as you release version 2.4.3 I'm going to bump version in Buildroot too, at the moment it's still 1.3.4.

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
#5 lore raw
Quoted 30 lines · Giulio Benetti
Quoted 29 lines · Steve Dickson
Quoted 26 lines · Giulio Benetti

Giulio Benetti (3):
rpcgen: bump to latest version
rpcgen: rpc_cout: silence format-nonliteral
support: nfs: rpc_socket: silence unused parameter warning on salen

   support/nfs/rpc_socket.c   |    2 +
   tools/rpcgen/Makefile.am   |   24 +-
   tools/rpcgen/proto.h       |   65 ++
   tools/rpcgen/rpc_clntout.c |  458 +++++---
   tools/rpcgen/rpc_cout.c    | 1269 ++++++++++++----------
   tools/rpcgen/rpc_hout.c    |  915 +++++++++-------
   tools/rpcgen/rpc_main.c    | 2083 +++++++++++++++++++++---------------
   tools/rpcgen/rpc_parse.c   | 1055 +++++++++---------
   tools/rpcgen/rpc_parse.h   |  103 +-
   tools/rpcgen/rpc_sample.c  |  465 ++++----
   tools/rpcgen/rpc_scan.c    |  812 +++++++-------
   tools/rpcgen/rpc_scan.h    |   91 +-
   tools/rpcgen/rpc_svcout.c  | 1647 +++++++++++++++-------------
   tools/rpcgen/rpc_tblout.c  |  265 ++---
   tools/rpcgen/rpc_util.c    |  656 ++++++------
   tools/rpcgen/rpc_util.h    |  170 ++-
   tools/rpcgen/rpcgen.1      |  442 ++++++++
   17 files changed, 6123 insertions(+), 4399 deletions(-)

create mode 100644 tools/rpcgen/proto.h
create mode 100644 tools/rpcgen/rpcgen.1

Quoted 6 lines
Quoted 1 line

Committed... (tag nfs-utils-2-4-3-rc5)... Nice work!!!

Wooho! Thank you :-)

As soon as you release version 2.4.3 I'm going to bump version in Buildroot too, at the moment it's still 1.3.4.

Ah, I've forgot that on xtensa it fails building and need this patch to be applied to:
https://patchwork.kernel.org/patch/11335261/

If you have the chance to commit before releasing version it would be great!

Kind regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
#6 lore raw
Quoted 35 lines · Giulio Benetti
Quoted 34 lines · Giulio Benetti
Quoted 29 lines · Steve Dickson
Quoted 22 lines · Giulio Benetti

Giulio Benetti (3):
    rpcgen: bump to latest version
    rpcgen: rpc_cout: silence format-nonliteral
    support: nfs: rpc_socket: silence unused parameter warning on salen

   support/nfs/rpc_socket.c   |    2 +
   tools/rpcgen/Makefile.am   |   24 +-
   tools/rpcgen/proto.h       |   65 ++
   tools/rpcgen/rpc_clntout.c |  458 +++++---

   tools/rpcgen/rpc_cout.c    | 1269 ++++++++++++----------
   tools/rpcgen/rpc_hout.c    |  915 +++++++++-------
   tools/rpcgen/rpc_main.c    | 2083 +++++++++++++++++++++---------------

   tools/rpcgen/rpc_parse.c   | 1055 +++++++++--------- tools/rpcgen/rpc_parse.h   |  103 +- tools/rpcgen/rpc_sample.c  |  465 ++++---- tools/rpcgen/rpc_scan.c    |  812 +++++++------- tools/rpcgen/rpc_scan.h    |   91 +- tools/rpcgen/rpc_svcout.c  | 1647 +++++++++++++++------------- tools/rpcgen/rpc_tblout.c  |  265 ++--- tools/rpcgen/rpc_util.c    |  656 ++++++------ tools/rpcgen/rpc_util.h    |  170 ++- tools/rpcgen/rpcgen.1      |  442 ++++++++

Quoted 4 lines
   17 files changed, 6123 insertions(+), 4399 deletions(-)

   create mode 100644 tools/rpcgen/proto.h
   create mode 100644 tools/rpcgen/rpcgen.1

Quoted 1 line

Committed... (tag nfs-utils-2-4-3-rc5)... Nice work!!!

Wooho! Thank you :-)

Quoted 7 lines
Quoted 2 lines

As soon as you release version 2.4.3 I'm going to bump version in Buildroot too, at the moment it's still 1.3.4.

Ah, I've forgot that on xtensa it fails building and need this patch to be applied to:
https://patchwork.kernel.org/patch/11335261/

If you have the chance to commit before releasing version it would be great!

Your patch on my radar... but... conflicts with Petr's cross-compilation patch
https://lore.kernel.org/linux-nfs/20200114183603.GA24556@dell5510/T/#t

That patch causes an automake warnings which is something I'm trying to avoid.

No worries... I will not do a release w/out your patch.... or something close to it.

steved.

#7 lore raw

Hi Steve, Giulio,

[Cc: Mike]

Quoted 42 lines · Giulio Benetti
Quoted 40 lines · Giulio Benetti
Quoted 30 lines · Steve Dickson
Quoted 28 lines · Giulio Benetti
Quoted 25 lines

Giulio Benetti (3):
    rpcgen: bump to latest version
    rpcgen: rpc_cout: silence format-nonliteral
    support: nfs: rpc_socket: silence unused parameter warning on salen

   support/nfs/rpc_socket.c   |    2 +
   tools/rpcgen/Makefile.am   |   24 +-
   tools/rpcgen/proto.h       |   65 ++
   tools/rpcgen/rpc_clntout.c |  458 +++++---

   tools/rpcgen/rpc_cout.c    | 1269 ++++++++++++----------
   tools/rpcgen/rpc_hout.c    |  915 +++++++++-------
   tools/rpcgen/rpc_main.c    | 2083 +++++++++++++++++++++---------------

   tools/rpcgen/rpc_parse.c   | 1055 +++++++++--------- tools/rpcgen/rpc_parse.h   |  103 +- tools/rpcgen/rpc_sample.c  |  465 ++++---- tools/rpcgen/rpc_scan.c    |  812 +++++++------- tools/rpcgen/rpc_scan.h    |   91 +- tools/rpcgen/rpc_svcout.c  | 1647 +++++++++++++++------------- tools/rpcgen/rpc_tblout.c  |  265 ++--- tools/rpcgen/rpc_util.c    |  656 ++++++------ tools/rpcgen/rpc_util.h    |  170 ++- tools/rpcgen/rpcgen.1      |  442 ++++++++

   17 files changed, 6123 insertions(+), 4399 deletions(-)

   create mode 100644 tools/rpcgen/proto.h
   create mode 100644 tools/rpcgen/rpcgen.1

Quoted 6 lines
Quoted 1 line

Committed... (tag nfs-utils-2-4-3-rc5)... Nice work!!!

Wooho! Thank you :-)

As soon as you release version 2.4.3 I'm going to bump version in Buildroot too, at the moment it's still 1.3.4.

Ah, I've forgot that on xtensa it fails building and need this patch to be applied to:
https://patchwork.kernel.org/patch/11335261/

Quoted 7 lines
Quoted 1 line

If you have the chance to commit before releasing version it would be great!

Your patch on my radar... but... conflicts with Petr's cross-compilation patch
https://lore.kernel.org/linux-nfs/20200114183603.GA24556@dell5510/T/#t

That patch causes an automake warnings which is something I'm trying to avoid.

No worries... I will not do a release w/out your patch.... or something close to it.

Giulio, thanks for your patch. I'll have a look on it over a weekend. Maybe Mike's cross-compilation patch is really not needed.

Quoted 1 line

steved.

Kind regards,
Petr

#8 lore raw

Hey Petr,

Quoted 11 lines · Petr Vorel
Quoted 7 lines
Quoted 1 line

If you have the chance to commit before releasing version it would be great!

Your patch on my radar... but... conflicts with Petr's cross-compilation patch
https://lore.kernel.org/linux-nfs/20200114183603.GA24556@dell5510/T/#t

That patch causes an automake warnings which is something I'm trying to avoid.

No worries... I will not do a release w/out your patch.... or something close to it.

Giulio, thanks for your patch. I'll have a look on it over a weekend. Maybe Mike's cross-compilation patch is really not needed.

Thanks... for taking a second look!!

steved.

Reviewed-by Tested-by
#9 lore raw

Hi all,

Quoted 11 lines · Petr Vorel
Quoted 10 lines
Quoted 7 lines
Quoted 1 line

If you have the chance to commit before releasing version it would be great!

Your patch on my radar... but... conflicts with Petr's cross-compilation patch
https://lore.kernel.org/linux-nfs/20200114183603.GA24556@dell5510/T/#t

That patch causes an automake warnings which is something I'm trying to avoid.

No worries... I will not do a release w/out your patch.... or something close to it.

Giulio, thanks for your patch. I'll have a look on it over a weekend. Maybe Mike's cross-compilation patch is really not needed.

NOTE: as I understand it's a compilation issue of a tool, so I didn't run rpcgen, I just test various compilation variants.

Considering recently merged Giulio's change in tools/rpcgen/Makefile.am e61775d1 ("rpcgen: bump to latest version") I'm for trying this one.

I tested buildroot compilation of Giulio's changes [1] [2] and it works. Notable change is to move from nfs-utils' internal rpcgen to external one from system (replace --with-rpcgen=internal with --with-rpcgen=$(HOST_DIR)/bin/rpcgen in [2]). IMHO Mike's patch is not needed for buildroot.

@Mike, could you please test it for Gentoo?

Looking at Gentoo package history, all packages [3] [4] [5] use rpcgen from system (--with-rpcgen). This change was added 2 years ago for, nfs-utils 2.3.x [6]; but Mike's patch was here at least 5 years ago [7], for nfs-utils 1.2.x and 1.3.x (actually sent to ML in 2013-03-25 [8], so for 1.2.x?), so the patch might not be needed any more since then anyway.

BTW NEWS file for nfs-utils 1.1.0 states that by default use rpcgen from system, so it looks to me that at the time of Mike's patch needed for Gentoo it was also using internal rpcgen, but maybe I'm wrong.

Kind regards,
Petr

[1] https://github.com/giuliobenetti/nfs-utils/commit/c45edd7a5d5aa51c735017a7fd4fd89948ad05b2
[2] https://github.com/giuliobenetti/buildroot/commit/e4ae0d0e33e61858701bfe44e9777f7c69584706
[3] https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/nfs-utils/nfs-utils-2.3.4.ebuild
[4] https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/nfs-utils/nfs-utils-2.4.1-r4.ebuild
[5] https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/nfs-utils/nfs-utils-2.4.2-r1.ebuild
[6] https://gitweb.gentoo.org/repo/gentoo.git/commit/net-fs/nfs-utils?id=d3c1580e4b5e583a457055f1a01818269e65459f
[7] https://gitweb.gentoo.org/repo/gentoo.git/commit/net-fs/nfs-utils?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d
[8] https://lore.kernel.org/linux-nfs/[email protected]/