diff options
author | jbj <devnull@localhost> | 2002-11-30 21:42:24 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-11-30 21:42:24 +0000 |
commit | bd00220d417766369bb3e14193bbe7c2876a53e4 (patch) | |
tree | 7e4c1a81c8caf9b76d1867c96d513e3ab8ae409d | |
parent | 0046c56cf8dc3503bc6f93d7bfde34cb8a9ac5c2 (diff) | |
download | rpm-bd00220d417766369bb3e14193bbe7c2876a53e4.tar.gz rpm-bd00220d417766369bb3e14193bbe7c2876a53e4.tar.bz2 rpm-bd00220d417766369bb3e14193bbe7c2876a53e4.zip |
Splint fiddles.
CVS patchset: 5907
CVS date: 2002/11/30 21:42:24
-rw-r--r-- | .splintrc | 2 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | build/.lclintrc | 2 | ||||
-rw-r--r-- | build/rpmfc.c | 9 | ||||
-rw-r--r-- | build/rpmfc.h | 7 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | file/file.c | 6 | ||||
-rw-r--r-- | file/file.h | 14 |
8 files changed, 29 insertions, 19 deletions
@@ -1,4 +1,4 @@ --I. -I./build -I./lib -I./rpmdb -I./rpmio -I./beecrypt -I./popt -I./zlib -I/usr/lib/gcc-lib/i386-redhat-linux/3.1/include -DHAVE_CONFIG_H -D_GNU_SOURCE -D_REENTRANT -DHAVE_DEV_DSP -DHAVE_SYS_SOUNDCARD +-I. -I./build -I./lib -I./rpmdb -I./rpmio -I./beecrypt -I./popt -I./elfutils/libelf -I./zlib -I/usr/lib/gcc-lib/i386-redhat-linux/3.1/include -DHAVE_CONFIG_H -D_GNU_SOURCE -D_REENTRANT -DHAVE_DEV_DSP -DHAVE_SYS_SOUNDCARD #+partial +forcehints diff --git a/Makefile.am b/Makefile.am index 42168c3db..e298f42ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,7 +24,6 @@ INCLUDES = \ -I$(top_srcdir)/beecrypt \ -I$(top_srcdir)/popt \ @WITH_LIBELF_INCLUDE@ \ - @WITH_ZLIB_INCLUDE@ \ @INCPATH@ myLDFLAGS = @LDFLAGS_STATIC@ diff --git a/build/.lclintrc b/build/.lclintrc index 94897f6ee..8f683ee47 100644 --- a/build/.lclintrc +++ b/build/.lclintrc @@ -1,4 +1,4 @@ --I. -I.. -I../lib -I../rpmdb -I../rpmio -I../beecrypt -I../popt -DHAVE_CONFIG_H -D_GNU_SOURCE +-I. -I.. -I../lib -I../rpmdb -I../rpmio -I../beecrypt -I../popt -I../elfutils/libelf -DHAVE_CONFIG_H -D_GNU_SOURCE +partial +forcehints diff --git a/build/rpmfc.c b/build/rpmfc.c index d88e56ef9..b347c2ee5 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -6,7 +6,6 @@ #include <rpmbuild.h> #include <argv.h> #include <rpmfc.h> -#include <rpmfile.h> #if HAVE_GELF_H #include <gelf.h> @@ -14,11 +13,7 @@ #include "debug.h" -/*@unchecked@*/ -extern fmagic global_fmagic; - -/*@unchecked@*//*@observer@*/ -extern const char * default_magicfile; +/*@access fmagic @*/ /*@unchecked@*/ int _rpmfc_debug; @@ -951,7 +946,9 @@ int wid = 0; /* XXX don't prepend filename: */ xx = argvAdd(&fc->cdict, ""); xx = argvAdd(&fc->cdict, "directory"); +/*@-assignexpose@*/ fm->magicfile = default_magicfile; +/*@=assignexpose@*/ /* XXX TODO fm->flags = ??? */ xx = fmagicSetup(fm, fm->magicfile, action); diff --git a/build/rpmfc.h b/build/rpmfc.h index 2609f2e3b..9bdc6285e 100644 --- a/build/rpmfc.h +++ b/build/rpmfc.h @@ -1,8 +1,10 @@ #ifndef _H_RPMFC_ #define _H_RPMFC_ -/*@notchecked@*/ +#include "rpmfile.h" + /*@-exportlocal@*/ +/*@unchecked@*/ extern int _rpmfc_debug; /*@=exportlocal@*/ @@ -115,7 +117,8 @@ rpmfc rpmfcNew(void) * Build file class dictionary and mappings. */ int rpmfcClassify(rpmfc fc, ARGV_t argv) - /*@modifies fc @*/; + /*@globals global_fmagic, fileSystem, internalState @*/ + /*@modifies fc, global_fmagic, fileSystem, internalState @*/; /** * BUild file/package dependency dictionary and mappings. diff --git a/configure.ac b/configure.ac index 6dd2ee34d..f1ec32dbf 100644 --- a/configure.ac +++ b/configure.ac @@ -368,7 +368,9 @@ WITH_LIBELF_INCLUDE= WITH_LIBELF_LIB= AC_CHECK_HEADER([libelf.h]) AC_CHECK_HEADER([gelf.h], [ + AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.]) AC_CHECK_LIB(elf, gelf_getvernaux, [ + AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).]) WITH_LIBELF_LIB="/usr/lib/libelf.a" ]) ], [ @@ -385,10 +387,11 @@ AC_SUBST(WITH_LIBELF_INCLUDE) AC_SUBST(WITH_LIBELF_LIB) WITH_LIBDWARF_INCLUDE= -AC_CHECK_HEADER([dwarf.h], [], [ +AC_CHECK_HEADER([dwarf.h], [ + AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.]) + ], [ if test -d elfutils/libdwarf ; then AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.]) - AC_DEFINE(HAVE_LIBDWARF, 1, [Define to 1 if you have the `dwarf' library (-ldwarf).]) WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf" fi ]) diff --git a/file/file.c b/file/file.c index c8c00209b..f2f680349 100644 --- a/file/file.c +++ b/file/file.c @@ -34,12 +34,6 @@ FILE_RCSID("@(#)Id: file.c,v 1.66 2002/07/03 19:00:41 christos Exp ") /*@access fmagic @*/ -/*@unchecked@*/ -extern fmagic global_fmagic; - -/*@unchecked@*/ /*@observer@*/ -extern const char * default_magicfile; - #ifdef S_IFLNK # define USAGE "Usage: %s [-bciknsvzL] [-f namefile] [-m magicfiles] file...\n" #else diff --git a/file/file.h b/file/file.h index b85c059a2..c06da7d3a 100644 --- a/file/file.h +++ b/file/file.h @@ -154,6 +154,16 @@ struct fmagic_s { typedef /*@abstract@*/ struct fmagic_s * fmagic; +/*unchecked@*/ +extern fmagic global_fmagic; + +/*@unchecked@*//*@observer@*/ +extern const char * default_magicfile; + +#ifdef __cplusplus +extern "C" { +#endif + /*@mayexit@*/ extern int fmagicSetup(fmagic fm, const char *fn, int action) /*@globals fileSystem, internalState @*/ @@ -204,4 +214,8 @@ extern int pipe2file(int fd, void *startbuf, size_t nbytes) /*@globals errno, fileSystem, internalState @*/ /*@modifies errno, fileSystem, internalState @*/; +#ifdef __cplusplus +} +#endif + #endif /* __file_h__ */ |