From 383602344921ab6dbe72e35bdc085567ccda2b69 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Fri, 25 Apr 2014 15:23:16 -0400 Subject: [PATCH] rxgen: use unsigned type for max array length Plain '0' is of type int, i.e., signed, and therefore so is '~0'. The length of an XDR array is unsigned, so this constant should be of an unsigned type. Change-Id: I13f5f94b2f54bc0adcdf2ded1696b797b5205057 Reviewed-on: http://gerrit.openafs.org/11107 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: D Brashear --- src/rxgen/rpc_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c index 9c3d133..3deb417 100644 --- a/src/rxgen/rpc_parse.c +++ b/src/rxgen/rpc_parse.c @@ -473,7 +473,7 @@ get_declaration(declaration * dec, defkind dkind) } dec->rel = REL_ARRAY; if (peekscan(TOK_RANGLE, &tok)) { - dec->array_max = "~0"; /* unspecified size, use max */ + dec->array_max = "~0u"; /* unspecified size, use max */ } else { scan_num(&tok); dec->array_max = tok.str; -- 1.9.4