From 83d6e589a5ac6b9a4ac001df05bb537ae5d97646 Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 2 Aug 2004 21:08:19 +0000 Subject: [PATCH] Start splint annotations. CVS patchset: 7384 CVS date: 2004/08/02 21:08:19 --- zlib/.splintrc | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zlib/trees.c | 4 +-- 2 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 zlib/.splintrc diff --git a/zlib/.splintrc b/zlib/.splintrc new file mode 100644 index 0000000..771469f --- /dev/null +++ b/zlib/.splintrc @@ -0,0 +1,112 @@ +-I. -DHAVE_CONFIG_H -D_GNU_SOURCE -DSTDC -DHAVE_UNISTD_H -DHAS_snprintf -DHAS_vsnprintf -DUSE_MMAP -DWITH_RSYNC_PAD + ++partial ++forcehints + +-warnposix + ++unixlib + +-unrecogcomments # XXX ignore doxygen markings + ++strict # lclint level + +# --- in progress +-globs +-infloopsuncon +-internalglobs +-modunconnomods +-nullassign +-nullstate +-oldstyle +-staticinittrans + +-abstract # 4 +-aliasunique # 2 +-assignexpose +-branchstate +-bufferoverflowhigh +-castfcnptr # 6 +-compdef # 16 +-compmempass # 37 +-evalorder # 2 +-globstate # 1 +-mods # 13 +-noeffectuncon # 10 +-nullderef # 9 +-nullpass # 24 +-nullptrarith # 4 +-nullret # 13 +-protoparammatch # 22 +-redef # 4 +-retalias # 4 +-retvalint # painful +-sizeoftype # 106 +-type # 3 +-usereleased # 38 + +-dependenttrans # 2 +-immediatetrans +-kepttrans # 8 +-observertrans +-readonlytrans +-statictrans +-temptrans # 7 +-unqualifiedtrans # 10 + +-casebreak +-looploopbreak +-looploopcontinue +-loopswitchbreak +-switchswitchbreak +-whileempty + +# --- +partial artifacts +-declundef +-exportheadervar +-exportlocal + +-enummemuse +-fcnuse +-typeuse +-varuse + +# --- not-yet at strict level +-bitwisesigned # pita +-elseifcomplete # 95 occurences +-exportconst # 839 occurences +-exportfcn +-exporttype +-exportvar +-fielduse # 1 occurence +-forblock # tedious +-ifblock # tedious +-incondefs # heartburn +-matchfields # heartburn +-namechecks # tedious ANSI compliance checks +-ptrarith # tedious + +-compdestroy +-mustdefine +-shiftimplementation +-shiftnegative + +-strictops +-strictusereleased +-stringliterallen 4096 # redhat*PubKey's are big +-whileblock # tedious + +# --- not-yet at checks level +-ansi-reserved ++enumint +-mustfree +-predboolptr +-usedef + +# --- not-yet at standard level +-boolops +-predboolint ++boolint ++charint ++ignorequals ++matchanyintegral diff --git a/zlib/trees.c b/zlib/trees.c index bb09554..9f8d637 100644 --- a/zlib/trees.c +++ b/zlib/trees.c @@ -1139,9 +1139,7 @@ local void set_data_type(s) * method would use a table) * IN assertion: 1 <= len <= 15 */ -local unsigned bi_reverse(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ +local unsigned bi_reverse(unsigned code, int len) { register unsigned res = 0; do { -- 2.7.4