From 760d3a0c8b9c70b0fac0e6af49e683c9bf289d7e Mon Sep 17 00:00:00 2001 From: jbj Date: Sat, 30 Nov 2002 22:15:29 +0000 Subject: More splint fiddles. CVS patchset: 5908 CVS date: 2002/11/30 22:15:29 --- Makefile.am | 2 +- lib/.lclintrc | 63 ------------------------------------------------------- lib/.splintrc | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/Makefile.am | 10 +++++---- rpmdb/.lclintrc | 62 ------------------------------------------------------ rpmdb/.splintrc | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ rpmdb/Makefile.am | 12 ++++++----- rpmio/.lclintrc | 60 ---------------------------------------------------- rpmio/.splintrc | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ rpmio/Makefile.am | 8 ++++--- 10 files changed, 204 insertions(+), 198 deletions(-) delete mode 100644 lib/.lclintrc create mode 100644 lib/.splintrc delete mode 100644 rpmdb/.lclintrc create mode 100644 rpmdb/.splintrc delete mode 100644 rpmio/.lclintrc create mode 100644 rpmio/.splintrc diff --git a/Makefile.am b/Makefile.am index e298f42ba..d18f672a2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,7 @@ INCLUDES = \ @WITH_LIBELF_INCLUDE@ \ @INCPATH@ -myLDFLAGS = @LDFLAGS_STATIC@ +myLDFLAGS = # @LDFLAGS_STATIC@ # XXX libtool can/should generate dependent libs. # XXX solaris2.6 cannot use *.la with --all-static (downrev binutils/egcs?) diff --git a/lib/.lclintrc b/lib/.lclintrc deleted file mode 100644 index 169628e33..000000000 --- a/lib/.lclintrc +++ /dev/null @@ -1,63 +0,0 @@ --I. -I.. -I../build -I../rpmdb -I../rpmio -I../beecrypt -I../popt -DHAVE_CONFIG_H -D_GNU_SOURCE - -+partial -+forcehints - --warnunixlib --warnposix - -+unixlib - --unrecogcomments # XXX ignore doxygen markings - -+strict # lclint level - -# --- in progress -+bounds -+slovak-fcns --redecl --bufferoverflowhigh - -# --- +partial artifacts --declundef --exportheadervar --exportlocal - --enummemuse --fcnuse --typeuse --varuse - -# --- not-yet at strict level -+bounds # 0 --bitwisesigned # 255 --elseifcomplete # 95 occurences --exportconst # 839 occurences --exportfcn --exporttype --exportvar --fielduse # 1 occurence --forblock # tedious --ifblock # tedious --namechecks # 1843 tedious ANSI compliance checks --ptrarith # 164 - --compdestroy # 66 --mustdefine # 66 --sys-dir-errors - --strictops # 46 --whileblock # 54 - -# --- not-yet at checks level -+enumint # 861 --mustfree # 671 --predboolptr # 311 --usedef # 191 - -# --- not-yet at standard level --boolops # 165 -+boolint # 106 -+charint # 173 -+ignorequals # 397 -+matchanyintegral # 115 diff --git a/lib/.splintrc b/lib/.splintrc new file mode 100644 index 000000000..d3df363f0 --- /dev/null +++ b/lib/.splintrc @@ -0,0 +1,63 @@ +-I. -I.. -I../build -I../rpmdb -I../rpmio -I../beecrypt -I../popt -I../elfutils/libelf -DHAVE_CONFIG_H -D_GNU_SOURCE + ++partial ++forcehints + +-warnunixlib +-warnposix + ++unixlib + +-unrecogcomments # XXX ignore doxygen markings + ++strict # lclint level + +# --- in progress ++bounds ++slovak-fcns +-redecl +-bufferoverflowhigh + +# --- +partial artifacts +-declundef +-exportheadervar +-exportlocal + +-enummemuse +-fcnuse +-typeuse +-varuse + +# --- not-yet at strict level ++bounds # 0 +-bitwisesigned # 255 +-elseifcomplete # 95 occurences +-exportconst # 839 occurences +-exportfcn +-exporttype +-exportvar +-fielduse # 1 occurence +-forblock # tedious +-ifblock # tedious +-namechecks # 1843 tedious ANSI compliance checks +-ptrarith # 164 + +-compdestroy # 66 +-mustdefine # 66 +-sys-dir-errors + +-strictops # 46 +-whileblock # 54 + +# --- not-yet at checks level ++enumint # 861 +-mustfree # 671 +-predboolptr # 311 +-usedef # 191 + +# --- not-yet at standard level +-boolops # 165 ++boolint # 106 ++charint # 173 ++ignorequals # 397 ++matchanyintegral # 115 diff --git a/lib/Makefile.am b/lib/Makefile.am index e6f30adf6..fcefb84e2 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,6 +2,8 @@ AUTOMAKE_OPTIONS = 1.4 foreign +LINT = splint + INCLUDES = -I. \ -I$(top_srcdir) \ -I$(top_srcdir)/build \ @@ -25,7 +27,7 @@ mylibpaths = \ -L$(top_builddir)/rpmio \ -L$(top_builddir)/popt -mylibs = -lrpm -lrpmdb -lrpmio -lpopt @LIBS@ @INTLLIBS@ @LIBMISC@ +mylibs = -lrpm -lrpmdb -lrpmio -lpopt @WITH_LIBELF_LIB@ @LIBS@ @INTLLIBS@ @LIBMISC@ LIBS = lib_LTLIBRARIES = librpm.la @@ -83,9 +85,9 @@ rpmlib.lcd: Makefile.am ${librpm_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS} sources: @echo $(librpm_la_SOURCES:%=lib/%) -.PHONY: lclint -lclint: - lclint $(DEFS) $(INCLUDES) $(librpm_la_SOURCES) +.PHONY: lint +lint: + $(LINT) $(DEFS) $(INCLUDES) $(librpm_la_SOURCES) th: th.c librpm.la $(CC) $(CFLAGS) $(DEFS) $(INCLUDES) -o $@ $< $(mylibpaths) $(mylibs) $(LIBS) diff --git a/rpmdb/.lclintrc b/rpmdb/.lclintrc deleted file mode 100644 index 4689c17ca..000000000 --- a/rpmdb/.lclintrc +++ /dev/null @@ -1,62 +0,0 @@ --I. -I.. -I../build -I../lib -I../rpmio -I../beecrypt -I../popt -DHAVE_CONFIG_H -D_GNU_SOURCE - -+partial -+forcehints - --warnunixlib --warnposix - -+unixlib - --unrecogcomments # XXX ignore doxygen markings - -+strict # lclint level - -# --- in progress -+bounds -+slovak-fcns --bufferoverflowhigh - -# --- +partial artifacts --declundef --exportheadervar --exportlocal - --enummemuse --fcnuse --typeuse --varuse - -# --- not-yet at strict level --bitwisesigned # 160 --elseifcomplete # 9 --exportconst # 687 --exportfcn # 464 --exporttype # 196 --exportvar # 55 --fielduse # 225 occurence --forblock # tedious --ifblock # tedious --namechecks # 1679 --ptrarith # 201 - --compdestroy # 125 --mustdefine # 76 --sys-dir-errors - --strictops # 54 --strictusereleased # 3 --whileblock # 20 - -# --- not-yet at checks level -+enumint # 211 --mustfree # 219 --predboolptr # 107 --usedef # 42 - -# --- not-yet at standard level --boolops # 81 -+boolint # 18 -+charint # 74 -+ignorequals # 104 -+matchanyintegral # 90 diff --git a/rpmdb/.splintrc b/rpmdb/.splintrc new file mode 100644 index 000000000..baa53e40c --- /dev/null +++ b/rpmdb/.splintrc @@ -0,0 +1,62 @@ +-I. -I.. -I../build -I../lib -I../rpmio -I../beecrypt -I../popt -I../elfutils/libelf -DHAVE_CONFIG_H -D_GNU_SOURCE + ++partial ++forcehints + +-warnunixlib +-warnposix + ++unixlib + +-unrecogcomments # XXX ignore doxygen markings + ++strict # lclint level + +# --- in progress ++bounds ++slovak-fcns +-bufferoverflowhigh + +# --- +partial artifacts +-declundef +-exportheadervar +-exportlocal + +-enummemuse +-fcnuse +-typeuse +-varuse + +# --- not-yet at strict level +-bitwisesigned # 160 +-elseifcomplete # 9 +-exportconst # 687 +-exportfcn # 464 +-exporttype # 196 +-exportvar # 55 +-fielduse # 225 occurence +-forblock # tedious +-ifblock # tedious +-namechecks # 1679 +-ptrarith # 201 + +-compdestroy # 125 +-mustdefine # 76 +-sys-dir-errors + +-strictops # 54 +-strictusereleased # 3 +-whileblock # 20 + +# --- not-yet at checks level ++enumint # 211 +-mustfree # 219 +-predboolptr # 107 +-usedef # 42 + +# --- not-yet at standard level +-boolops # 81 ++boolint # 18 ++charint # 74 ++ignorequals # 104 ++matchanyintegral # 90 diff --git a/rpmdb/Makefile.am b/rpmdb/Makefile.am index 9201924fc..c6026e85d 100644 --- a/rpmdb/Makefile.am +++ b/rpmdb/Makefile.am @@ -2,6 +2,8 @@ AUTOMAKE_OPTIONS = 1.4 foreign +LINT = splint + INCLUDES = -I. \ -I$(top_srcdir)/build \ -I$(top_srcdir)/lib \ @@ -28,7 +30,7 @@ mylibpaths = \ -L$(top_builddir)/rpmio \ -L$(top_builddir)/popt -mylibs = -lrpm -lrpmio -lpopt @LIBS@ @INTLLIBS@ @LIBMISC@ +mylibs = -lrpm -lrpmio -lpopt @WITH_LIBELF_LIB@ @LIBS@ @INTLLIBS@ @LIBMISC@ LIBS = DB3LOBJS = $(shell cat $(top_builddir)/$(WITH_DB_SUBDIR)/db3lobjs) @@ -40,7 +42,7 @@ librpmdb_la_SOURCES = \ poptDB.c rpmhash.c rpmdb.c \ tagname.c tagtbl.c librpmdb_la_LDFLAGS = -release @VERSION@ @libdb3@ -librpmdb_la_LIBADD = $(DBLIBOBJS) $(DB3LOBJS) @WITH_LIBELF_LIB@ +librpmdb_la_LIBADD = $(DBLIBOBJS) $(DB3LOBJS) librpmdb_la_DEPENDENCIES = $(DBLIBOBJS) .created # XXX make sure that db.h symlink is generated @@ -92,9 +94,9 @@ rpmdb.lcd: Makefile.am ${librpmdb_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS sources: @echo $(librpmdb_la_SOURCES:%=rpmdb/%) -.PHONY: lclint -lclint: - lclint $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES) +.PHONY: lint +lint: + $(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES) tdbi: librpmdb.la tdbi.o $(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS) diff --git a/rpmio/.lclintrc b/rpmio/.lclintrc deleted file mode 100644 index d82306b54..000000000 --- a/rpmio/.lclintrc +++ /dev/null @@ -1,60 +0,0 @@ --I. -I.. -I../beecrypt -I../popt -I../zlib -DHAVE_CONFIG_H -D_GNU_SOURCE - -+partial -+forcehints - --warnunixlib --warnposix - -+unixlib - --unrecogcomments # XXX ignore doxygen markings - -+strict # lclint level - -# --- in progress -+bounds --bufferoverflowhigh - -# --- +partial artifacts --declundef --exportheadervar --exportlocal - --enummemuse --fcnuse --typeuse --varuse - -# --- not-yet at strict level --bitwisesigned # 204 --elseifcomplete # 31 --exportconst # 265 --exportfcn # 381 --exporttype # 109 --exportvar # 32 --fielduse # 72 --forblock # tedious --ifblock # tedious --namechecks # 929 tedious ANSI compliance checks --ptrarith # 104 - --compdestroy # 21 --mustdefine # 34 --sys-dir-errors - --strictops # 51 --whileblock # tedious - -# --- not-yet at checks level -+enumint # 117 --mustfree # 136 --predboolptr # 156 --usedef # 9 - -# --- not-yet at standard level --boolops # 116 -+boolint # 11 -+charint # 146 -+ignorequals # 112 -+matchanyintegral # 39 diff --git a/rpmio/.splintrc b/rpmio/.splintrc new file mode 100644 index 000000000..d82306b54 --- /dev/null +++ b/rpmio/.splintrc @@ -0,0 +1,60 @@ +-I. -I.. -I../beecrypt -I../popt -I../zlib -DHAVE_CONFIG_H -D_GNU_SOURCE + ++partial ++forcehints + +-warnunixlib +-warnposix + ++unixlib + +-unrecogcomments # XXX ignore doxygen markings + ++strict # lclint level + +# --- in progress ++bounds +-bufferoverflowhigh + +# --- +partial artifacts +-declundef +-exportheadervar +-exportlocal + +-enummemuse +-fcnuse +-typeuse +-varuse + +# --- not-yet at strict level +-bitwisesigned # 204 +-elseifcomplete # 31 +-exportconst # 265 +-exportfcn # 381 +-exporttype # 109 +-exportvar # 32 +-fielduse # 72 +-forblock # tedious +-ifblock # tedious +-namechecks # 929 tedious ANSI compliance checks +-ptrarith # 104 + +-compdestroy # 21 +-mustdefine # 34 +-sys-dir-errors + +-strictops # 51 +-whileblock # tedious + +# --- not-yet at checks level ++enumint # 117 +-mustfree # 136 +-predboolptr # 156 +-usedef # 9 + +# --- not-yet at standard level +-boolops # 116 ++boolint # 11 ++charint # 146 ++ignorequals # 112 ++matchanyintegral # 39 diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am index c4efe0ae3..4f25b38ab 100644 --- a/rpmio/Makefile.am +++ b/rpmio/Makefile.am @@ -2,6 +2,8 @@ AUTOMAKE_OPTIONS = 1.4 foreign +LINT = splint + EXTRA_DIST = tdigest.c tdir.c tficl.c tfts.c tglob.c tinv.c tkey.c trpmio.c EXTRA_PROGRAMS = tdigest tdir tfts tglob tinv tkey tring trpmio dumpasn1 @@ -55,9 +57,9 @@ rpmio.lcd: Makefile.am ${librpmio_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS sources: @echo $(librpmio_la_SOURCES:%=rpmio/%) -.PHONY: lclint -lclint: - lclint $(DEFS) $(INCLUDES) $(librpmio_la_SOURCES) +.PHONY: lint +lint: + $(LINT) $(DEFS) $(INCLUDES) $(librpmio_la_SOURCES) tdigest_SOURCES = tdigest.c tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la -- cgit v1.2.3