* [PATCH] rpcinfo: Removed a number of "old-style function definition" warnings
@ 2025-07-26 21:00 Steve Dickson
2025-07-26 23:14 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2025-07-26 21:00 UTC (permalink / raw)
To: Libtirpc-devel Mailing List; +Cc: Linux NFS Mailing list
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/rpcinfo.c | 142 +++++++++++++++++++++-----------------------------
1 file changed, 58 insertions(+), 84 deletions(-)
diff --git a/src/rpcinfo.c b/src/rpcinfo.c
index 006057a..c59e8b4 100644
--- a/src/rpcinfo.c
+++ b/src/rpcinfo.c
@@ -356,9 +356,7 @@ local_rpcb (rpcprog_t prog, rpcvers_t vers)
#ifdef PORTMAP
static enum clnt_stat
-ip_ping_one(client, vers)
- CLIENT *client;
- u_int32_t vers;
+ip_ping_one(CLIENT * client, u_int32_t vers)
{
struct timeval to = { .tv_sec = 10, .tv_usec = 0 };
@@ -376,11 +374,7 @@ ip_ping_one(client, vers)
* version 0 calls succeeds, it tries for MAXVERS call and repeats the same.
*/
static void
-ip_ping (portnum, proto, argc, argv)
- u_short portnum;
- char *proto;
- int argc;
- char **argv;
+ip_ping (u_short portnum, char *proto, int argc, char **argv)
{
CLIENT *client;
enum clnt_stat rpc_stat;
@@ -480,9 +474,7 @@ ip_ping (portnum, proto, argc, argv)
* Dump all the portmapper registerations
*/
static void
-pmapdump (argc, argv)
- int argc;
- char **argv;
+pmapdump (int argc, char **argv)
{
struct pmaplist *head = NULL;
struct timeval minutetimeout;
@@ -581,11 +573,8 @@ pmapdump (argc, argv)
* the address using rpcb_getaddr.
*/
CLIENT *
-ip_getclient(hostname, prognum, versnum, proto)
- const char *hostname;
- rpcprog_t prognum;
- rpcvers_t versnum;
- const char *proto;
+ip_getclient(const char *hostname, rpcprog_t prognum,
+ rpcvers_t versnum, const char *proto)
{
void *handle;
enum clnt_stat saved_stat = RPC_SUCCESS;
@@ -674,10 +663,10 @@ sa_len(struct sockaddr *sa)
*/
/*ARGSUSED*/ static bool_t
-reply_proc (res, who, nconf)
- void *res; /* Nothing comes back */
- struct netbuf *who; /* Who sent us the reply */
- struct netconfig *nconf; /* On which transport the reply came */
+reply_proc (
+ void *res, /* Nothing comes back */
+ struct netbuf *who, /* Who sent us the reply */
+ struct netconfig *nconf) /* On which transport the reply came */
{
char *uaddr;
char hostbuf[NI_MAXHOST];
@@ -703,9 +692,7 @@ reply_proc (res, who, nconf)
}
static void
-brdcst (argc, argv)
- int argc;
- char **argv;
+brdcst (int argc, char **argv)
{
enum clnt_stat rpc_stat;
u_long prognum, vers;
@@ -731,9 +718,7 @@ brdcst (argc, argv)
}
static bool_t
-add_version (rs, vers)
- struct rpcbdump_short *rs;
- u_long vers;
+add_version (struct rpcbdump_short *rs, u_long vers)
{
struct verslist *vl;
@@ -752,9 +737,7 @@ add_version (rs, vers)
}
static bool_t
-add_netid (rs, netid)
- struct rpcbdump_short *rs;
- char *netid;
+add_netid (struct rpcbdump_short *rs, char *netid)
{
struct netidlist *nl;
@@ -773,11 +756,11 @@ add_netid (rs, netid)
}
static void
-rpcbdump (dumptype, netid, argc, argv)
- int dumptype;
- char *netid;
- int argc;
- char **argv;
+rpcbdump (
+ int dumptype,
+ char *netid,
+ int argc,
+ char **argv)
{
rpcblist_ptr head = NULL;
struct timeval minutetimeout;
@@ -1021,10 +1004,10 @@ error:fprintf (stderr, "rpcinfo: no memory\n");
static char nullstring[] = "\000";
static void
-rpcbaddrlist (netid, argc, argv)
- char *netid;
- int argc;
- char **argv;
+rpcbaddrlist (
+ char *netid,
+ int argc,
+ char **argv)
{
rpcb_entry_list_ptr head = NULL;
struct timeval minutetimeout;
@@ -1143,9 +1126,7 @@ rpcbaddrlist (netid, argc, argv)
* monitor rpcbind
*/
static void
-rpcbgetstat (argc, argv)
- int argc;
- char **argv;
+rpcbgetstat (int argc, char **argv)
{
rpcb_stat_byvers inf;
struct timeval minutetimeout;
@@ -1379,10 +1360,10 @@ rpcbgetstat (argc, argv)
* Delete registeration for this (prog, vers, netid)
*/
static void
-deletereg (netid, argc, argv)
- char *netid;
- int argc;
- char **argv;
+deletereg (
+ char *netid,
+ int argc,
+ char **argv)
{
struct netconfig *nconf = NULL;
@@ -1414,11 +1395,11 @@ deletereg (netid, argc, argv)
* Exit if cannot create handle.
*/
static CLIENT *
-clnt_addr_create (address, nconf, prog, vers)
- char *address;
- struct netconfig *nconf;
- u_long prog;
- u_long vers;
+clnt_addr_create (
+ char *address,
+ struct netconfig *nconf,
+ u_long prog,
+ u_long vers)
{
CLIENT *client;
static struct netbuf *nbuf;
@@ -1456,11 +1437,11 @@ clnt_addr_create (address, nconf, prog, vers)
* sent directly to the services themselves.
*/
static void
-addrping (address, netid, argc, argv)
- char *address;
- char *netid;
- int argc;
- char **argv;
+addrping (
+ char *address,
+ char *netid,
+ int argc,
+ char **argv)
{
CLIENT *client;
struct timeval to;
@@ -1583,10 +1564,10 @@ addrping (address, netid, argc, argv)
* then sent directly to the services themselves.
*/
static void
-progping (netid, argc, argv)
- char *netid;
- int argc;
- char **argv;
+progping (
+ char *netid,
+ int argc,
+ char **argv)
{
CLIENT *client;
struct timeval to;
@@ -1729,8 +1710,7 @@ usage ()
}
static u_long
-getprognum (arg)
- char *arg;
+getprognum (char *arg)
{
char *strptr;
register struct rpcent *rpc;
@@ -1761,8 +1741,7 @@ getprognum (arg)
}
static u_long
-getvers (arg)
- char *arg;
+getvers (char *arg)
{
char *strptr;
register u_long vers;
@@ -1784,10 +1763,10 @@ getvers (arg)
* a good error message.
*/
static int
-pstatus (client, prog, vers)
- register CLIENT *client;
- u_long prog;
- u_long vers;
+pstatus (
+ register CLIENT *client,
+ u_long prog,
+ u_long vers)
{
struct rpc_err rpcerr;
@@ -1806,10 +1785,10 @@ pstatus (client, prog, vers)
}
static CLIENT *
-clnt_rpcbind_create (host, rpcbversnum, targaddr)
- char *host;
- int rpcbversnum;
- struct netbuf **targaddr;
+clnt_rpcbind_create (
+ char *host,
+ int rpcbversnum,
+ struct netbuf **targaddr)
{
static char *tlist[3] = {
"circuit_n", "circuit_v", "datagram_v"
@@ -1842,11 +1821,11 @@ clnt_rpcbind_create (host, rpcbversnum, targaddr)
}
static CLIENT *
-getclnthandle (host, nconf, rpcbversnum, targaddr)
- char *host;
- struct netconfig *nconf;
- u_long rpcbversnum;
- struct netbuf **targaddr;
+getclnthandle (
+ char *host,
+ struct netconfig *nconf,
+ u_long rpcbversnum,
+ struct netbuf **targaddr)
{
struct netbuf addr;
struct addrinfo hints, *res;
@@ -1898,9 +1877,7 @@ getclnthandle (host, nconf, rpcbversnum, targaddr)
}
static void
-print_rmtcallstat (rtype, infp)
- int rtype;
- rpcb_stat *infp;
+print_rmtcallstat (int rtype, rpcb_stat *infp)
{
register rpcbs_rmtcalllist_ptr pr;
struct rpcent *rpc;
@@ -1924,9 +1901,7 @@ print_rmtcallstat (rtype, infp)
}
static void
-print_getaddrstat (rtype, infp)
- int rtype;
- rpcb_stat *infp;
+print_getaddrstat (int rtype, rpcb_stat *infp)
{
rpcbs_addrlist_ptr al;
register struct rpcent *rpc;
@@ -1945,8 +1920,7 @@ print_getaddrstat (rtype, infp)
}
static char *
-spaces (howmany)
- int howmany;
+spaces (int howmany)
{
static char space_array[] = /* 64 spaces */
" ";
--
2.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rpcinfo: Removed a number of "old-style function definition" warnings
2025-07-26 21:00 [PATCH] rpcinfo: Removed a number of "old-style function definition" warnings Steve Dickson
@ 2025-07-26 23:14 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2025-07-26 23:14 UTC (permalink / raw)
To: Libtirpc-devel Mailing List; +Cc: Linux NFS Mailing list
On 7/26/25 5:00 PM, Steve Dickson wrote:
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... (tag: rpcbind-1_2_8-rc3)
steved.
> ---
> src/rpcinfo.c | 142 +++++++++++++++++++++-----------------------------
> 1 file changed, 58 insertions(+), 84 deletions(-)
>
> diff --git a/src/rpcinfo.c b/src/rpcinfo.c
> index 006057a..c59e8b4 100644
> --- a/src/rpcinfo.c
> +++ b/src/rpcinfo.c
> @@ -356,9 +356,7 @@ local_rpcb (rpcprog_t prog, rpcvers_t vers)
>
> #ifdef PORTMAP
> static enum clnt_stat
> -ip_ping_one(client, vers)
> - CLIENT *client;
> - u_int32_t vers;
> +ip_ping_one(CLIENT * client, u_int32_t vers)
> {
> struct timeval to = { .tv_sec = 10, .tv_usec = 0 };
>
> @@ -376,11 +374,7 @@ ip_ping_one(client, vers)
> * version 0 calls succeeds, it tries for MAXVERS call and repeats the same.
> */
> static void
> -ip_ping (portnum, proto, argc, argv)
> - u_short portnum;
> - char *proto;
> - int argc;
> - char **argv;
> +ip_ping (u_short portnum, char *proto, int argc, char **argv)
> {
> CLIENT *client;
> enum clnt_stat rpc_stat;
> @@ -480,9 +474,7 @@ ip_ping (portnum, proto, argc, argv)
> * Dump all the portmapper registerations
> */
> static void
> -pmapdump (argc, argv)
> - int argc;
> - char **argv;
> +pmapdump (int argc, char **argv)
> {
> struct pmaplist *head = NULL;
> struct timeval minutetimeout;
> @@ -581,11 +573,8 @@ pmapdump (argc, argv)
> * the address using rpcb_getaddr.
> */
> CLIENT *
> -ip_getclient(hostname, prognum, versnum, proto)
> - const char *hostname;
> - rpcprog_t prognum;
> - rpcvers_t versnum;
> - const char *proto;
> +ip_getclient(const char *hostname, rpcprog_t prognum,
> + rpcvers_t versnum, const char *proto)
> {
> void *handle;
> enum clnt_stat saved_stat = RPC_SUCCESS;
> @@ -674,10 +663,10 @@ sa_len(struct sockaddr *sa)
> */
>
> /*ARGSUSED*/ static bool_t
> -reply_proc (res, who, nconf)
> - void *res; /* Nothing comes back */
> - struct netbuf *who; /* Who sent us the reply */
> - struct netconfig *nconf; /* On which transport the reply came */
> +reply_proc (
> + void *res, /* Nothing comes back */
> + struct netbuf *who, /* Who sent us the reply */
> + struct netconfig *nconf) /* On which transport the reply came */
> {
> char *uaddr;
> char hostbuf[NI_MAXHOST];
> @@ -703,9 +692,7 @@ reply_proc (res, who, nconf)
> }
>
> static void
> -brdcst (argc, argv)
> - int argc;
> - char **argv;
> +brdcst (int argc, char **argv)
> {
> enum clnt_stat rpc_stat;
> u_long prognum, vers;
> @@ -731,9 +718,7 @@ brdcst (argc, argv)
> }
>
> static bool_t
> -add_version (rs, vers)
> - struct rpcbdump_short *rs;
> - u_long vers;
> +add_version (struct rpcbdump_short *rs, u_long vers)
> {
> struct verslist *vl;
>
> @@ -752,9 +737,7 @@ add_version (rs, vers)
> }
>
> static bool_t
> -add_netid (rs, netid)
> - struct rpcbdump_short *rs;
> - char *netid;
> +add_netid (struct rpcbdump_short *rs, char *netid)
> {
> struct netidlist *nl;
>
> @@ -773,11 +756,11 @@ add_netid (rs, netid)
> }
>
> static void
> -rpcbdump (dumptype, netid, argc, argv)
> - int dumptype;
> - char *netid;
> - int argc;
> - char **argv;
> +rpcbdump (
> + int dumptype,
> + char *netid,
> + int argc,
> + char **argv)
> {
> rpcblist_ptr head = NULL;
> struct timeval minutetimeout;
> @@ -1021,10 +1004,10 @@ error:fprintf (stderr, "rpcinfo: no memory\n");
> static char nullstring[] = "\000";
>
> static void
> -rpcbaddrlist (netid, argc, argv)
> - char *netid;
> - int argc;
> - char **argv;
> +rpcbaddrlist (
> + char *netid,
> + int argc,
> + char **argv)
> {
> rpcb_entry_list_ptr head = NULL;
> struct timeval minutetimeout;
> @@ -1143,9 +1126,7 @@ rpcbaddrlist (netid, argc, argv)
> * monitor rpcbind
> */
> static void
> -rpcbgetstat (argc, argv)
> - int argc;
> - char **argv;
> +rpcbgetstat (int argc, char **argv)
> {
> rpcb_stat_byvers inf;
> struct timeval minutetimeout;
> @@ -1379,10 +1360,10 @@ rpcbgetstat (argc, argv)
> * Delete registeration for this (prog, vers, netid)
> */
> static void
> -deletereg (netid, argc, argv)
> - char *netid;
> - int argc;
> - char **argv;
> +deletereg (
> + char *netid,
> + int argc,
> + char **argv)
> {
> struct netconfig *nconf = NULL;
>
> @@ -1414,11 +1395,11 @@ deletereg (netid, argc, argv)
> * Exit if cannot create handle.
> */
> static CLIENT *
> -clnt_addr_create (address, nconf, prog, vers)
> - char *address;
> - struct netconfig *nconf;
> - u_long prog;
> - u_long vers;
> +clnt_addr_create (
> + char *address,
> + struct netconfig *nconf,
> + u_long prog,
> + u_long vers)
> {
> CLIENT *client;
> static struct netbuf *nbuf;
> @@ -1456,11 +1437,11 @@ clnt_addr_create (address, nconf, prog, vers)
> * sent directly to the services themselves.
> */
> static void
> -addrping (address, netid, argc, argv)
> - char *address;
> - char *netid;
> - int argc;
> - char **argv;
> +addrping (
> + char *address,
> + char *netid,
> + int argc,
> + char **argv)
> {
> CLIENT *client;
> struct timeval to;
> @@ -1583,10 +1564,10 @@ addrping (address, netid, argc, argv)
> * then sent directly to the services themselves.
> */
> static void
> -progping (netid, argc, argv)
> - char *netid;
> - int argc;
> - char **argv;
> +progping (
> + char *netid,
> + int argc,
> + char **argv)
> {
> CLIENT *client;
> struct timeval to;
> @@ -1729,8 +1710,7 @@ usage ()
> }
>
> static u_long
> -getprognum (arg)
> - char *arg;
> +getprognum (char *arg)
> {
> char *strptr;
> register struct rpcent *rpc;
> @@ -1761,8 +1741,7 @@ getprognum (arg)
> }
>
> static u_long
> -getvers (arg)
> - char *arg;
> +getvers (char *arg)
> {
> char *strptr;
> register u_long vers;
> @@ -1784,10 +1763,10 @@ getvers (arg)
> * a good error message.
> */
> static int
> -pstatus (client, prog, vers)
> - register CLIENT *client;
> - u_long prog;
> - u_long vers;
> +pstatus (
> + register CLIENT *client,
> + u_long prog,
> + u_long vers)
> {
> struct rpc_err rpcerr;
>
> @@ -1806,10 +1785,10 @@ pstatus (client, prog, vers)
> }
>
> static CLIENT *
> -clnt_rpcbind_create (host, rpcbversnum, targaddr)
> - char *host;
> - int rpcbversnum;
> - struct netbuf **targaddr;
> +clnt_rpcbind_create (
> + char *host,
> + int rpcbversnum,
> + struct netbuf **targaddr)
> {
> static char *tlist[3] = {
> "circuit_n", "circuit_v", "datagram_v"
> @@ -1842,11 +1821,11 @@ clnt_rpcbind_create (host, rpcbversnum, targaddr)
> }
>
> static CLIENT *
> -getclnthandle (host, nconf, rpcbversnum, targaddr)
> - char *host;
> - struct netconfig *nconf;
> - u_long rpcbversnum;
> - struct netbuf **targaddr;
> +getclnthandle (
> + char *host,
> + struct netconfig *nconf,
> + u_long rpcbversnum,
> + struct netbuf **targaddr)
> {
> struct netbuf addr;
> struct addrinfo hints, *res;
> @@ -1898,9 +1877,7 @@ getclnthandle (host, nconf, rpcbversnum, targaddr)
> }
>
> static void
> -print_rmtcallstat (rtype, infp)
> - int rtype;
> - rpcb_stat *infp;
> +print_rmtcallstat (int rtype, rpcb_stat *infp)
> {
> register rpcbs_rmtcalllist_ptr pr;
> struct rpcent *rpc;
> @@ -1924,9 +1901,7 @@ print_rmtcallstat (rtype, infp)
> }
>
> static void
> -print_getaddrstat (rtype, infp)
> - int rtype;
> - rpcb_stat *infp;
> +print_getaddrstat (int rtype, rpcb_stat *infp)
> {
> rpcbs_addrlist_ptr al;
> register struct rpcent *rpc;
> @@ -1945,8 +1920,7 @@ print_getaddrstat (rtype, infp)
> }
>
> static char *
> -spaces (howmany)
> - int howmany;
> +spaces (int howmany)
> {
> static char space_array[] = /* 64 spaces */
> " ";
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-26 23:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-26 21:00 [PATCH] rpcinfo: Removed a number of "old-style function definition" warnings Steve Dickson
2025-07-26 23:14 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).