From 0a8ad4366457eb1b119e7bdaa3cf452fa0e177f5 Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 5 Feb 2002 22:02:15 +0000 Subject: [PATCH] cast ~0 to (u_int) because it is aimed at the size argument of the xdr function. --- usr.bin/rpcgen/rpc_parse.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/usr.bin/rpcgen/rpc_parse.c b/usr.bin/rpcgen/rpc_parse.c index 00a2fbe7766a..486cd0435f11 100644 --- a/usr.bin/rpcgen/rpc_parse.c +++ b/usr.bin/rpcgen/rpc_parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_parse.c,v 1.11 2002/01/31 19:36:49 tv Exp $ */ +/* $NetBSD: rpc_parse.c,v 1.12 2002/02/05 22:02:15 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI"; #else -__RCSID("$NetBSD: rpc_parse.c,v 1.11 2002/01/31 19:36:49 tv Exp $"); +__RCSID("$NetBSD: rpc_parse.c,v 1.12 2002/02/05 22:02:15 christos Exp $"); #endif #endif @@ -460,8 +460,8 @@ get_declaration(dec, dkind) } dec->rel = REL_ARRAY; if (peekscan(TOK_RANGLE, &tok)) { - dec->array_max = "~0"; /* unspecified size, use - * max */ + dec->array_max = "(u_int)~0"; + /* unspecified size, use * max */ } else { scan_num(&tok); dec->array_max = tok.str; @@ -529,7 +529,8 @@ get_prog_declaration(dec, dkind, num) } dec->rel = REL_ARRAY; if (peekscan(TOK_RANGLE, &tok)) { - dec->array_max = "~0"; /* unspecified size, use max */ + dec->array_max = "(u_int)~0"; + /* unspecified size, use max */ } else { scan_num(&tok); dec->array_max = tok.str; @@ -541,7 +542,8 @@ get_prog_declaration(dec, dkind, num) * type of argument - make it * string<> */ dec->rel = REL_ARRAY; - dec->array_max = "~0"; /* unspecified size, use max */ + dec->array_max = "(u_int)~0"; + /* unspecified size, use max */ } } }