Lclint fiddles.

CVS patchset: 5468
CVS date: 2002/06/05 22:07:55
This commit is contained in:
jbj 2002-06-05 22:07:55 +00:00
parent e8f1e41330
commit 8d1ff9feac
10 changed files with 36 additions and 19 deletions

View File

@ -7,6 +7,7 @@ EXTRA_DIST = CHANGES CREDITS Doxyheader GROUPS README.amiga INSTALL \
autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
config.site db db3/configure gendiff installplatform platform* \
xmlspec/Makefile xmlspec/*.cpp xmlspec/*.h xmlspec/*.xml \
xmlspec/doc/*.html \
Perl-RPM po/*.in po/*.po po/rpm.pot \
rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c

View File

@ -6,8 +6,10 @@
* Structures used for managing added/available package lists.
*/
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmal_debug;
/*@=exportlocal@*/
/**
*/

View File

@ -8,8 +8,10 @@
/**
*/
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmds_debug;
/*@=exportlocal@*/
#if defined(_RPMDS_INTERNAL)
/**

View File

@ -6,8 +6,10 @@
* Structure(s) used for file info tag sets.
*/
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmfi_debug;
/*@=exportlocal@*/
#if defined(_RPMFI_INTERNAL)
/**

View File

@ -601,10 +601,8 @@ int rpmMachineScore(int type, const char * name)
* @return 0 always
*/
int rpmShowRC(FILE * fp)
/*@globals rpmGlobalMacroContext,
fileSystem, internalState @*/
/*@modifies *fp, rpmGlobalMacroContext,
fileSystem, internalState @*/;
/*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
/*@modifies *fp, rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmrc
* @deprecated Use addMacro to set _target_* macros.
@ -614,8 +612,8 @@ int rpmShowRC(FILE * fp)
* @param osTable
*/
void rpmSetTables(int archTable, int osTable)
/*@globals fileSystem, internalState @*/
/*@modifies fileSystem, internalState @*/;
/*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmrc
* Set current arch/os names.
@ -628,8 +626,8 @@ void rpmSetTables(int archTable, int osTable)
* @param os os name (or NULL)
*/
void rpmSetMachine(/*@null@*/ const char * arch, /*@null@*/ const char * os)
/*@globals fileSystem, internalState @*/
/*@modifies fileSystem, internalState @*/;
/*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmrc
* Return current arch/os names.

View File

@ -26,9 +26,9 @@ static const char *defrcfiles = LIBRPMRC_FILENAME ":/etc/rpmrc:~/.rpmrc";
/*@observer@*/ /*@checked@*/
const char * macrofiles = MACROFILES;
/*@unchecked@*/
/*@observer@*/ /*@unchecked@*/
static const char * platform = "/etc/rpm/platform";
/*@unchecked@*/
/*@only@*/ /*@unchecked@*/
static const char ** platpat = NULL;
/*@unchecked@*/
static int nplatpat = 0;
@ -780,6 +780,10 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
/**
*/
static int rpmPlatform(const char * platform)
/*@globals nplatpat, platpat,
rpmGlobalMacroContext, fileSystem, internalState @*/
/*@modifies nplatpat, platpat,
rpmGlobalMacroContext, fileSystem, internalState @*/
{
char *cpu = NULL, *vendor = NULL, *os = NULL, *gnu = NULL;
char * b = NULL;
@ -813,9 +817,11 @@ static int rpmPlatform(const char * platform)
*t = '\0';
if (t > p) {
platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat));
/*@-onlyunqglobaltrans@*/
platpat[nplatpat] = xstrdup(p);
nplatpat++;
platpat[nplatpat] = NULL;
/*@=onlyunqglobaltrans@*/
}
continue;
}
@ -831,6 +837,7 @@ static int rpmPlatform(const char * platform)
vendor = p;
while (*p && !(*p == '-' || isspace(*p)))
p++;
/*@-branchstate@*/
if (*p != '-') {
if (*p != '\0') *p++ = '\0';
os = vendor;
@ -850,22 +857,27 @@ static int rpmPlatform(const char * platform)
}
if (*p != '\0') *p++ = '\0';
}
/*@=branchstate@*/
addMacro(NULL, "_host_cpu", NULL, cpu, -1);
addMacro(NULL, "_host_vendor", NULL, vendor, -1);
addMacro(NULL, "_host_os", NULL, os, -1);
platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat));
/*@-onlyunqglobaltrans@*/
platpat[nplatpat] = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}", (gnu && *gnu ? "-" : NULL), gnu, NULL);
nplatpat++;
platpat[nplatpat] = NULL;
/*@=onlyunqglobaltrans@*/
init_platform++;
}
rc = (init_platform ? 0 : -1);
exit:
/*@-modobserver@*/
b = _free(b);
/*@=modobserver@*/
return rc;
}
@ -1037,8 +1049,8 @@ static void mfspr_ill(int notused)
*/
static void defaultMachine(/*@out@*/ const char ** arch,
/*@out@*/ const char ** os)
/*@globals fileSystem@*/
/*@modifies *arch, *os, fileSystem @*/
/*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
/*@modifies *arch, *os, rpmGlobalMacroContext, fileSystem, internalState @*/
{
static struct utsname un;
static int gotDefaults = 0;
@ -1087,7 +1099,7 @@ static void defaultMachine(/*@out@*/ const char ** arch,
fd++) {
if (!xisdigit(un.release[fd]) && (un.release[fd] != '.')) {
un.release[fd] = 0;
break;
/*@innerbreak@*/ break;
}
}
sprintf(un.sysname,"sunos%s",un.release);

View File

@ -8,8 +8,10 @@
/**
*/
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmte_debug;
/*@=exportlocal@*/
/**
* Transaction element ordering chain linkage.
@ -29,11 +31,6 @@ typedef enum rpmElementType_e {
TR_REMOVED = (1 << 1) /*!< Package will be removed. */
} rpmElementType;
/*@-exportlocal@*/
/*@unchecked@*/
extern int _te_debug;
/*@=exportlocal@*/
#if defined(_RPMTE_INTERNAL)
/** \ingroup rpmte
* Dependncy ordering information.

View File

@ -55,6 +55,8 @@ extern int statvfs (const char * file, /*@out@*/ struct statvfs * buf)
/*@access FD_t @*/ /* XXX compared with NULL */
/*@access rpmps @*/
/*@access rpmDiskSpaceInfo @*/
/*@access rpmte @*/
/*@access rpmtsi @*/
/*@access rpmts @*/
/*@access fnpyKey @*/

View File

@ -42,6 +42,7 @@
/*@access rpmfi @*/
/*@access rpmte @*/
/*@access rpmtsi @*/
/*@access rpmts @*/

View File

@ -17,7 +17,7 @@ Name: rpm
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
Release: 0.22
Release: 0.24
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
Copyright: GPL