Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2002 23:01:12 +0200 (CEST)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        dan@obluda.cz
Subject:   bin/42387: cleaning code of librpcsvc from warnings
Message-ID:  <200209032101.g83L1Ckk010773@xkulesh.vol.cz>

next in thread | raw e-mail | index | archive | help


>Number:         42387
>Category:       bin
>Synopsis:       cleaning code of librpcsvc from warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 03 14:40:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Obludarium
>Environment:
src/lib/librpcsvc/rnusers.c,v 1.2 2001/09/30 22:15:15
src/lib/librpcsvc/rstat.c,v 1.2 2001/09/30 22:15:15
src/lib/librpcsvc/rwall.c,v 1.2 2001/09/30 22:15:15
src/lib/librpcsvc/yp_passwd.c,v 1.6 2002/02/06 15:26:03
src/lib/librpcsvc/yp_update.c,v 1.6 2002/02/06 15:26:03

>Description:
lib/librpcsvc/rnusers.c:
  56: warning: passing arg 5 of 'callrpc' from incompatible pointer type
               passing arg 7 of 'callrpc' from incompatible pointer type
  67: warning: passing arg 5 of 'callrpc' from incompatible pointer type
               passing arg 7 of 'callrpc' from incompatible pointer type
lib/librpcsvc/rstat.c:
  55: warning: passing arg 5 of 'callrpc' from incompatible pointer type
               passing arg 7 of 'callrpc' from incompatible pointer type
  66: warning: passing arg 5 of 'callrpc' from incompatible pointer type
               passing arg 7 of 'callrpc' from incompatible pointer type
lib/librpcsvc/rwall.c:
  55: warning: passing arg 5 of 'callrpc' from incompatible pointer type
               passing arg 7 of 'callrpc' from incompatible pointer type
lib/librpcsvc/yp_passwd.c:
  79: warning: passing arg 5 of 'callrpc' from incompatible pointer type
               passing arg 7 of 'callrpc' from incompatible pointer type
lib/librpcsvc/yp_update.c:
 130: warning: passing arg 3 of pointer to function from incompatible pointer type
               passing arg 5 of pointer to function from incompatible pointer type
 146: warning: passing arg 3 of pointer to function from incompatible pointer type
               passing arg 5 of pointer to function from incompatible pointer type
 160: warning: passing arg 3 of pointer to function from incompatible pointer type
               passing arg 5 of pointer to function from incompatible pointer type
 176: warning: passing arg 3 of pointer to function from incompatible pointer type
               passing arg 5 of pointer to function from incompatible pointer type


#>> all warnings may be supressed by casting apropriate args to (xdrproc_t) 

>How-To-Repeat:
	N/A
>Fix:

--- lib/librpcsvc/rnusers.c.ORIG	Mon Jul  1 22:53:53 2002
+++ lib/librpcsvc/rnusers.c	Tue Sep  3 22:41:05 2002
@@ -32,7 +32,7 @@
 __FBSDID("$FreeBSD: src/lib/librpcsvc/rnusers.c,v 1.2 2001/09/30 22:15:15 dillon Exp $");
 
 #if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rnusers.c	1.2 91/03/11 TIRPC 1.0; from 1.7 89/03/24 SMI";
+static const char sccsid[] = "@(#)rnusers.c	1.2 91/03/11 TIRPC 1.0; from 1.7 89/03/24 SMI";
 #endif
 
 /*
@@ -52,8 +52,8 @@
 	struct utmpidlearr *up;
 {
 	return (callrpc(host, RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES,
-			xdr_void, (char *) NULL,
-			xdr_utmpidlearr, (char *) up));
+			(xdrproc_t) xdr_void, (char *) NULL,
+			(xdrproc_t) xdr_utmpidlearr, (char *) up));
 }
 
 int
@@ -63,8 +63,8 @@
 	int nusers;
 
 	if (callrpc(host, RUSERSPROG, RUSERSVERS_ORIG, RUSERSPROC_NUM,
-			xdr_void, (char *) NULL,
-			xdr_u_long, (char *) &nusers) != 0)
+			(xdrproc_t) xdr_void, (char *) NULL,
+			(xdrproc_t) xdr_u_long, (char *) &nusers) != 0)
 		return (-1);
 	else
 		return (nusers);
--- lib/librpcsvc/rstat.c.ORIG	Mon Jul  1 22:53:53 2002
+++ lib/librpcsvc/rstat.c	Tue Sep  3 22:45:11 2002
@@ -32,7 +32,7 @@
 __FBSDID("$FreeBSD: src/lib/librpcsvc/rstat.c,v 1.2 2001/09/30 22:15:15 dillon Exp $");
 
 #if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rstat.c	1.2 91/03/11 TIRPC 1.0; from 1.6 89/03/24 SMI";
+static const char sccsid[] = "@(#)rstat.c	1.2 91/03/11 TIRPC 1.0; from 1.6 89/03/24 SMI";
 #endif
 
 /*
@@ -51,8 +51,8 @@
 	struct statstime *statp;
 {
 	return (callrpc(host, RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS,
-			xdr_void, (char *) NULL,
-			xdr_statstime, (char *) statp));
+			(xdrproc_t) xdr_void, (char *) NULL,
+			(xdrproc_t) xdr_statstime, (char *) statp));
 }
 
 int
@@ -62,8 +62,8 @@
 	long have;
 	
 	if (callrpc(host, RSTATPROG, RSTATVERS_SWTCH, RSTATPROC_HAVEDISK,
-			xdr_void, (char *) NULL,
-			xdr_long, (char *) &have) != 0)
+			(xdrproc_t) xdr_void, (char *) NULL,
+			(xdrproc_t) xdr_long, (char *) &have) != 0)
 		return (-1);
 	else
 		return (have);
--- lib/librpcsvc/rwall.c.ORIG	Mon Jul  1 22:53:53 2002
+++ lib/librpcsvc/rwall.c	Tue Sep  3 22:46:52 2002
@@ -32,7 +32,7 @@
 __FBSDID("$FreeBSD: src/lib/librpcsvc/rwall.c,v 1.2 2001/09/30 22:15:15 dillon Exp $");
 
 #if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rwall.c	1.2 91/03/11 TIRPC 1.0; from  1.3 89/03/24 SMI";
+static const char sccsid[] = "@(#)rwall.c	1.2 91/03/11 TIRPC 1.0; from  1.3 89/03/24 SMI";
 #endif
 
 /*
@@ -51,6 +51,6 @@
 	char *msg;
 {
 	return (callrpc(host, WALLPROG, WALLVERS, WALLPROC_WALL,
-			xdr_wrapstring, (char *) &msg,
-			xdr_void, (char *) NULL));
+			(xdrproc_t) xdr_wrapstring, (char *) &msg,
+			(xdrproc_t) xdr_void, (char *) NULL));
 }
--- lib/librpcsvc/yp_passwd.c.ORIG	Mon Jul  1 22:53:53 2002
+++ lib/librpcsvc/yp_passwd.c	Tue Sep  3 22:50:44 2002
@@ -76,7 +76,7 @@
 	}
 
 	rval = callrpc(server, YPPASSWDPROG, YPPASSWDVERS, YPPASSWDPROC_UPDATE,
-		       xdr_yppasswd, (char *)&yppasswd, xdr_int, (char *)&result);
+		       (xdrproc_t) xdr_yppasswd, (char *)&yppasswd, (xdrproc_t) xdr_int, (char *)&result);
 
 	free(server);
 	if (rval || result)
--- lib/librpcsvc/yp_update.c.ORIG	Wed Feb  6 16:26:03 2002
+++ lib/librpcsvc/yp_update.c	Tue Sep  3 22:57:54 2002
@@ -126,8 +126,8 @@
 		upargs.datum.yp_buf_len = datalen;
 		upargs.datum.yp_buf_val = data;
 
-		if ((rval = clnt_call(clnt, YPU_CHANGE, xdr_ypupdate_args,
-			&upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
+		if ((rval = clnt_call(clnt, YPU_CHANGE, (xdrproc_t) xdr_ypupdate_args,
+			&upargs, (xdrproc_t) xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
 			if (rval == RPC_AUTHERROR)
 				res = YPERR_ACCESS;
 			else
@@ -142,8 +142,8 @@
 		upargs.datum.yp_buf_len = datalen;
 		upargs.datum.yp_buf_val = data;
 
-		if ((rval = clnt_call(clnt, YPU_INSERT, xdr_ypupdate_args,
-			&upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
+		if ((rval = clnt_call(clnt, YPU_INSERT, (xdrproc_t) xdr_ypupdate_args,
+			&upargs, (xdrproc_t) xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
 			if (rval == RPC_AUTHERROR)
 				res = YPERR_ACCESS;
 			else
@@ -156,8 +156,8 @@
 		delargs.key.yp_buf_len = keylen;
 		delargs.key.yp_buf_val = key;
 
-		if ((rval = clnt_call(clnt, YPU_DELETE, xdr_ypdelete_args,
-			&delargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
+		if ((rval = clnt_call(clnt, YPU_DELETE, (xdrproc_t) xdr_ypdelete_args,
+			&delargs, (xdrproc_t) xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
 			if (rval == RPC_AUTHERROR)
 				res = YPERR_ACCESS;
 			else
@@ -172,8 +172,8 @@
 		upargs.datum.yp_buf_len = datalen;
 		upargs.datum.yp_buf_val = data;
 
-		if ((rval = clnt_call(clnt, YPU_STORE, xdr_ypupdate_args,
-			&upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
+		if ((rval = clnt_call(clnt, YPU_STORE, (xdrproc_t) xdr_ypupdate_args,
+			&upargs, (xdrproc_t) xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
 			if (rval == RPC_AUTHERROR)
 				res = YPERR_ACCESS;
 			else
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209032101.g83L1Ckk010773>