Subject: lib/1107: compile warnings in rpcsvc library
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Thorsten Lockert <tholo@SigmaSoft.COM>
List: netbsd-bugs
Date: 06/03/1995 23:05:11
>Number: 1107
>Category: lib
>Synopsis: compile warnings in rpcsvc library
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 3 23:05:09 1995
>Originator: Thorsten Lockert
>Organization:
SigmaSoft, Th. Lockert
>Release: May 28, 1995
>Environment:
System: NetBSD gandalf.sigmasoft.com 1.0A NetBSD 1.0A (GANDALF) #1: Sun May 7 21:49:27 PDT 1995 tholo@gandalf.sigmasoft.com:/usr/src/sys/arch/i386/compile/GANDALF i386
>Description:
There are compile warnings in the rpcsvc library when compiled with
-Wall -Wstrict-prototypes switches
>How-To-Repeat:
Compile with -Wall -Wstrict-prototypes
>Fix:
Apply the following patches, as well as the previous patch to rpcgen(1).
Note that there will still be some warnings left, due to the way the RPC
code is done.
diff -c src/lib/librpcsvc.orig/rnusers.x src/lib/librpcsvc/rnusers.x
*** src/lib/librpcsvc.orig/rnusers.x Sat Jun 3 22:31:56 1995
--- src/lib/librpcsvc/rnusers.x Sat Jun 3 22:46:17 1995
***************
*** 67,73 ****
% int uta_cnt;
%};
%typedef struct utmparr utmparr;
! %int xdr_utmparr();
%
%struct utmpidle {
% struct ru_utmp ui_utmp;
--- 67,73 ----
% int uta_cnt;
%};
%typedef struct utmparr utmparr;
! %int xdr_utmparr __P((XDR *, utmparr *));
%
%struct utmpidle {
% struct ru_utmp ui_utmp;
***************
*** 79,85 ****
% int uia_cnt;
%};
%typedef struct utmpidlearr utmpidlearr;
! %int xdr_utmpidlearr();
%
%#define RUSERSVERS_1 ((u_long)1)
%#define RUSERSVERS_2 ((u_long)2)
--- 79,90 ----
% int uia_cnt;
%};
%typedef struct utmpidlearr utmpidlearr;
! %int xdr_utmpidlearr __P((XDR *, utmpidlearr *));
! %
! %bool_t xdr_utmp __P((XDR *, struct ru_utmp *));
! %bool_t xdr_utmpptr __P((XDR *, struct utmp **));
! %bool_t xdr_utmpidle __P((XDR *, struct utmpidle *));
! %bool_t xdr_utmpidleptr __P((XDR *, struct utmpidle **));
%
%#define RUSERSVERS_1 ((u_long)1)
%#define RUSERSVERS_2 ((u_long)2)
diff -c src/lib/librpcsvc.orig/sm_inter.x src/lib/librpcsvc/sm_inter.x
*** src/lib/librpcsvc.orig/sm_inter.x Sat Jun 3 22:31:56 1995
--- src/lib/librpcsvc/sm_inter.x Sat Jun 3 22:37:59 1995
***************
*** 41,71 ****
%#endif /* not lint */
#endif
- program SM_PROG {
- version SM_VERS {
- /* res_stat = stat_succ if status monitor agrees to monitor */
- /* res_stat = stat_fail if status monitor cannot monitor */
- /* if res_stat == stat_succ, state = state number of site sm_name */
- struct sm_stat_res SM_STAT(struct sm_name) = 1;
-
- /* res_stat = stat_succ if status monitor agrees to monitor */
- /* res_stat = stat_fail if status monitor cannot monitor */
- /* stat consists of state number of local site */
- struct sm_stat_res SM_MON(struct mon) = 2;
-
- /* stat consists of state number of local site */
- struct sm_stat SM_UNMON(struct mon_id) = 3;
-
- /* stat consists of state number of local site */
- struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
-
- void SM_SIMU_CRASH(void) = 5;
-
- void SM_NOTIFY(struct stat_chge) = 6;
-
- } = 1;
- } = 100024;
-
const SM_MAXSTRLEN = 1024;
struct sm_name {
--- 41,46 ----
***************
*** 124,126 ****
--- 99,126 ----
int state;
opaque priv[16]; /* stored private information */
};
+
+ program SM_PROG {
+ version SM_VERS {
+ /* res_stat = stat_succ if status monitor agrees to monitor */
+ /* res_stat = stat_fail if status monitor cannot monitor */
+ /* if res_stat == stat_succ, state = state number of site sm_name */
+ struct sm_stat_res SM_STAT(struct sm_name) = 1;
+
+ /* res_stat = stat_succ if status monitor agrees to monitor */
+ /* res_stat = stat_fail if status monitor cannot monitor */
+ /* stat consists of state number of local site */
+ struct sm_stat_res SM_MON(struct mon) = 2;
+
+ /* stat consists of state number of local site */
+ struct sm_stat SM_UNMON(struct mon_id) = 3;
+
+ /* stat consists of state number of local site */
+ struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
+
+ void SM_SIMU_CRASH(void) = 5;
+
+ void SM_NOTIFY(struct stat_chge) = 6;
+
+ } = 1;
+ } = 100024;
diff -c src/lib/librpcsvc.orig/yppasswd.x src/lib/librpcsvc/yppasswd.x
*** src/lib/librpcsvc.orig/yppasswd.x Sat Jun 3 22:32:18 1995
--- src/lib/librpcsvc/yppasswd.x Sat Jun 3 22:33:24 1995
***************
*** 38,56 ****
%/*static char sccsid[] = "from: @(#)yppasswd.x 2.1 88/08/01 4.0 RPCSRC";*/
%static char rcsid[] = "$Id: yppasswd.x,v 1.1 1995/01/12 19:40:02 jtc Exp $";
%#endif /* not lint */
#endif
- program YPPASSWDPROG {
- version YPPASSWDVERS {
- /*
- * Update my passwd entry
- */
- int
- YPPASSWDPROC_UPDATE(yppasswd) = 1;
- } = 1;
- } = 100009;
-
-
struct x_passwd {
string pw_name<>; /* username */
string pw_passwd<>; /* encrypted password */
--- 38,47 ----
%/*static char sccsid[] = "from: @(#)yppasswd.x 2.1 88/08/01 4.0 RPCSRC";*/
%static char rcsid[] = "$Id: yppasswd.x,v 1.1 1995/01/12 19:40:02 jtc Exp $";
%#endif /* not lint */
+ #else
+ %#include <sys/cdefs.h>
#endif
struct x_passwd {
string pw_name<>; /* username */
string pw_passwd<>; /* encrypted password */
***************
*** 66,69 ****
x_passwd newpw; /* new passwd entry */
};
!
--- 57,68 ----
x_passwd newpw; /* new passwd entry */
};
! program YPPASSWDPROG {
! version YPPASSWDVERS {
! /*
! * Update my passwd entry
! */
! int
! YPPASSWDPROC_UPDATE(yppasswd) = 1;
! } = 1;
! } = 100009;
>Audit-Trail:
>Unformatted: