From dan@obluda.cz  Tue Sep  3 14:37:20 2002
Return-Path: <dan@obluda.cz>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E138637B400
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Sep 2002 14:37:20 -0700 (PDT)
Received: from xkulesh.vol.cz (xkulesh.vol.cz [195.250.154.106])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 44ED243E84
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Sep 2002 14:37:14 -0700 (PDT)
	(envelope-from dan@obluda.cz)
Received: from xkulesh.vol.cz (localhost [127.0.0.1])
	by xkulesh.vol.cz (8.12.5/8.12.5) with ESMTP id g83Lb8Jh000269;
	Tue, 3 Sep 2002 23:37:09 +0200 (CEST)
	(envelope-from dan@obluda.cz)
Received: (from dan@localhost)
	by xkulesh.vol.cz (8.12.6/8.12.6/Submit) id g83L1Ckk010773;
	Tue, 3 Sep 2002 23:01:12 +0200 (CEST)
Message-Id: <200209032101.g83L1Ckk010773@xkulesh.vol.cz>
Date: Tue, 3 Sep 2002 23:01:12 +0200 (CEST)
From: Dan Lukes <dan@obluda.cz>
Reply-To: Dan Lukes <dan@obluda.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc: dan@obluda.cz
Subject: cleaning code of librpcsvc from warnings
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         42387
>Category:       kern
>Synopsis:       [librpcsvc] [patch] cleaning code of librpcsvc from warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 03 14:40:04 PDT 2002
>Closed-Date:    Tue Sep 11 18:07:07 UTC 2012
>Last-Modified:  Tue Sep 11 18:07:07 UTC 2012
>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:
State-Changed-From-To: open->closed 
State-Changed-By: pfg 
State-Changed-When: Tue Sep 11 18:05:55 UTC 2012 
State-Changed-Why:  
This was fixed as part of r121529. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=42387 
>Unformatted:
