lclint annotations from build.
CVS patchset: 3366 CVS date: 1999/10/04 19:40:03
This commit is contained in:
parent
767f75648f
commit
cabcec3626
|
@ -1,4 +1,4 @@
|
|||
-I. -I.. -I../lib -DHAVE_CONFIG_H
|
||||
-I. -I.. -I../build -I../lib -I../popt -DHAVE_CONFIG_H
|
||||
|
||||
+partial
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
|||
|
||||
# don't-bother-me-yet parameters
|
||||
-branchstate
|
||||
-immediatetrans
|
||||
#-immediatetrans
|
||||
-mustfree
|
||||
-observertrans
|
||||
#-observertrans
|
||||
-statictrans
|
||||
|
||||
# not-yet normal parameters
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdio.h>
|
||||
#define DEBUG(x) do { x ; } while (0)
|
||||
#else
|
||||
#define DEBUG(x) do { } while (0)
|
||||
#define DEBUG(x)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ typedef struct {
|
|||
|
||||
const char *diskName; /* get file from here */
|
||||
const char *fileName; /* filename in cpio archive */
|
||||
const char *uname;
|
||||
const char *gname;
|
||||
/*@observer@*/ const char *uname;
|
||||
/*@observer@*/ const char *gname;
|
||||
int flags;
|
||||
int verifyFlags;
|
||||
const char *langs; /* XXX locales separated with | */
|
||||
|
@ -917,7 +917,8 @@ static int addFile(struct FileList *fl, const char *diskName, struct stat *statp
|
|||
mode_t fileMode;
|
||||
uid_t fileUid;
|
||||
gid_t fileGid;
|
||||
char *fileUname, *fileGname;
|
||||
const char *fileUname;
|
||||
const char *fileGname;
|
||||
char *lang;
|
||||
|
||||
/* Path may have prepended buildroot, so locate the original filename. */
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
#include "rpmbuild.h"
|
||||
|
||||
static uid_t uids[1024];
|
||||
static char *unames[1024];
|
||||
/*@owned@*/ /*@null@*/ static char *unames[1024];
|
||||
static int uid_used = 0;
|
||||
|
||||
static gid_t gids[1024];
|
||||
static char *gnames[1024];
|
||||
/*@owned@*/ /*@null@*/ static char *gnames[1024];
|
||||
static int gid_used = 0;
|
||||
|
||||
/*
|
||||
* getUname() takes a uid, gets the username, and creates an entry in the
|
||||
* table to hold a string containing the user name.
|
||||
*/
|
||||
char *getUname(uid_t uid)
|
||||
const char *getUname(uid_t uid)
|
||||
{
|
||||
struct passwd *pw;
|
||||
int x;
|
||||
|
@ -48,7 +48,7 @@ char *getUname(uid_t uid)
|
|||
* getUnameS() takes a username, gets the uid, and creates an entry in the
|
||||
* table to hold a string containing the user name.
|
||||
*/
|
||||
char *getUnameS(const char *uname)
|
||||
const char *getUnameS(const char *uname)
|
||||
{
|
||||
struct passwd *pw;
|
||||
int x;
|
||||
|
@ -81,7 +81,7 @@ char *getUnameS(const char *uname)
|
|||
* getGname() takes a gid, gets the group name, and creates an entry in the
|
||||
* table to hold a string containing the group name.
|
||||
*/
|
||||
char *getGname(gid_t gid)
|
||||
const char *getGname(gid_t gid)
|
||||
{
|
||||
struct group *gr;
|
||||
int x;
|
||||
|
@ -113,7 +113,7 @@ char *getGname(gid_t gid)
|
|||
* getGnameS() takes a group name, gets the gid, and creates an entry in the
|
||||
* table to hold a string containing the group name.
|
||||
*/
|
||||
char *getGnameS(const char *gname)
|
||||
const char *getGnameS(const char *gname)
|
||||
{
|
||||
struct group *gr;
|
||||
int x;
|
||||
|
@ -153,7 +153,7 @@ time_t *const getBuildTime(void)
|
|||
return &buildTime;
|
||||
}
|
||||
|
||||
char *const buildHost(void)
|
||||
const char *const buildHost(void)
|
||||
{
|
||||
static char hostname[1024];
|
||||
static int gotit = 0;
|
||||
|
@ -161,7 +161,7 @@ char *const buildHost(void)
|
|||
|
||||
if (! gotit) {
|
||||
gethostname(hostname, sizeof(hostname));
|
||||
if ((hbn = gethostbyname(hostname))) {
|
||||
if ((hbn = /*@-unrecog@*/ gethostbyname(hostname) /*@=unrecog@*/ )) {
|
||||
strcpy(hostname, hbn->h_name);
|
||||
} else {
|
||||
rpmMessage(RPMMESS_WARNING, _("Could not canonicalize hostname: %s\n"),
|
||||
|
|
|
@ -218,7 +218,7 @@ int readRPM(const char *fileName, Spec *specp, struct rpmlead *lead, Header *sig
|
|||
default:
|
||||
rpmError(RPMERR_BADMAGIC, _("readRPM: reading header from %s\n"), fileName);
|
||||
return RPMERR_BADMAGIC;
|
||||
break;
|
||||
/*@notreached@*/ break;
|
||||
}
|
||||
|
||||
if (specp)
|
||||
|
@ -438,6 +438,7 @@ static int cpio_gzip(FD_t fdo, CSA_t *csa)
|
|||
}
|
||||
|
||||
gzdClose(cfd->cpioGzFd);
|
||||
cfd->cpioGzFd = NULL;
|
||||
if (failedFile)
|
||||
xfree(failedFile);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ void addChangelogEntry(Header h, time_t time, const char *name, const char *text
|
|||
}
|
||||
|
||||
/* datestr is of the form 'Wed Jan 1 1997' */
|
||||
static int dateToTimet(const char * datestr, time_t * secs)
|
||||
static int dateToTimet(const char * datestr, /*@out@*/ time_t * secs)
|
||||
{
|
||||
struct tm time;
|
||||
char *p, *pe, *q, ** idx;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
extern int noLang; /* XXX FIXME: pass as arg */
|
||||
|
||||
/* These have to be global scope to make up for *stupid* compilers */
|
||||
static char *name;
|
||||
static char *lang;
|
||||
/*@observer@*/ /*@null@*/ static char *name;
|
||||
/*@observer@*/ /*@null@*/ static char *lang;
|
||||
|
||||
static struct poptOption optionsTable[] = {
|
||||
{ NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include "rpmbuild.h"
|
||||
|
||||
/* These have to be global scope to make up for *stupid* compilers */
|
||||
static char *name;
|
||||
static char *file;
|
||||
/*@observer@*/ /*@null@*/ static char *name;
|
||||
/*@observer@*/ /*@null@*/ static char *file;
|
||||
static struct poptOption optionsTable[] = {
|
||||
{ NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
|
||||
{ NULL, 'f', POPT_ARG_STRING, &file, 'f', NULL, NULL},
|
||||
|
|
|
@ -272,9 +272,10 @@ exit:
|
|||
struct spectag *
|
||||
stashSt(Spec spec, Header h, int tag, const char *lang)
|
||||
{
|
||||
struct spectags *st = spec->st;
|
||||
struct spectag *t = NULL;
|
||||
if (st) {
|
||||
|
||||
if (spec->st) {
|
||||
struct spectags *st = spec->st;
|
||||
if (st->st_ntags == st->st_nalloc) {
|
||||
st->st_nalloc += 10;
|
||||
st->st_t = xrealloc(st->st_t, st->st_nalloc * sizeof(*(st->st_t)));
|
||||
|
@ -368,8 +369,8 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro,
|
|||
break;
|
||||
case RPMTAG_GROUP:
|
||||
case RPMTAG_SUMMARY:
|
||||
stashSt(spec, pkg->header, tag, lang);
|
||||
/* fall thru */
|
||||
(void) stashSt(spec, pkg->header, tag, lang);
|
||||
/*@fallthrough@*/
|
||||
case RPMTAG_DISTRIBUTION:
|
||||
case RPMTAG_VENDOR:
|
||||
case RPMTAG_LICENSE:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* These have to be global to make up for stupid compilers */
|
||||
static int leaveDirs, skipDefaultAction;
|
||||
static int createDir, quietly;
|
||||
static char * dirName;
|
||||
/*@observer@*/ /*@null@*/ static char * dirName;
|
||||
static struct poptOption optionsTable[] = {
|
||||
{ NULL, 'a', POPT_ARG_STRING, NULL, 'a', NULL, NULL},
|
||||
{ NULL, 'b', POPT_ARG_STRING, NULL, 'b', NULL, NULL},
|
||||
|
|
|
@ -36,9 +36,9 @@ static int addTriggerIndex(Package pkg, char *file, char *script, char *prog)
|
|||
}
|
||||
|
||||
/* these have to be global because of stupid compilers */
|
||||
static char *name;
|
||||
static char *prog;
|
||||
static char *file;
|
||||
/*@observer@*/ /*@null@*/ static char *name;
|
||||
/*@observer@*/ /*@null@*/ static char *prog;
|
||||
/*@observer@*/ /*@null@*/ static char *file;
|
||||
static struct poptOption optionsTable[] = {
|
||||
{ NULL, 'p', POPT_ARG_STRING, &prog, 'p', NULL, NULL},
|
||||
{ NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "rpmbuild.h"
|
||||
|
||||
int addReqProv(Spec spec, Header h,
|
||||
int addReqProv(/*@unused@*/ Spec spec, Header h,
|
||||
int flag, const char *name, const char *version, int index)
|
||||
{
|
||||
const char **names;
|
||||
|
|
|
@ -69,13 +69,13 @@ extern "C" {
|
|||
|
||||
/* from build/names.h */
|
||||
|
||||
char *getUname(uid_t uid);
|
||||
char *getUnameS(const char *uname);
|
||||
char *getGname(gid_t gid);
|
||||
char *getGnameS(const char *gname);
|
||||
/*@observer@*/ const char *getUname(uid_t uid);
|
||||
/*@observer@*/ const char *getUnameS(const char *uname);
|
||||
/*@observer@*/ const char *getGname(gid_t gid);
|
||||
/*@observer@*/ const char *getGnameS(const char *gname);
|
||||
|
||||
char *const buildHost(void);
|
||||
time_t *const getBuildTime(void);
|
||||
/*@observer@*/ const char *const buildHost(void);
|
||||
/*@observer@*/ time_t *const getBuildTime(void);
|
||||
|
||||
/* from build/read.h */
|
||||
|
||||
|
@ -127,7 +127,7 @@ void freePackage(/*@only@*/ Package p);
|
|||
|
||||
/* from build/reqprov.h */
|
||||
|
||||
int addReqProv(Spec spec, Header h,
|
||||
int addReqProv(/*@unused@*/Spec spec, Header h,
|
||||
int flag, const char *name, const char *version, int index);
|
||||
|
||||
/* from build/files.h */
|
||||
|
|
|
@ -55,13 +55,13 @@ struct spectag {
|
|||
int t_tag;
|
||||
int t_startx;
|
||||
int t_nlines;
|
||||
char *t_lang;
|
||||
char *t_msgid;
|
||||
/*@only@*/ const char *t_lang;
|
||||
/*@only@*/ const char *t_msgid;
|
||||
};
|
||||
|
||||
|
||||
struct spectags {
|
||||
struct spectag *st_t;
|
||||
/*@owned@*/ struct spectag *st_t;
|
||||
int st_nalloc;
|
||||
int st_ntags;
|
||||
};
|
||||
|
@ -73,11 +73,11 @@ struct speclines {
|
|||
};
|
||||
|
||||
struct SpecStruct {
|
||||
/*@only@*/ char *specFile;
|
||||
/*@only@*/ char *sourceRpmName;
|
||||
/*@only@*/ const char *specFile;
|
||||
/*@only@*/ const char *sourceRpmName;
|
||||
|
||||
struct speclines *sl;
|
||||
struct spectags *st;
|
||||
/*@owned@*/ struct speclines *sl;
|
||||
/*@owned@*/ struct spectags *st;
|
||||
|
||||
/*@owned@*/ struct OpenFileInfo *fileStack;
|
||||
char lbuf[BUFSIZ];
|
||||
|
@ -88,7 +88,7 @@ struct SpecStruct {
|
|||
|
||||
/*@only@*/ struct ReadLevelEntry *readStack;
|
||||
|
||||
Header buildRestrictions;
|
||||
/*@refcounted@*/ Header buildRestrictions;
|
||||
/*@owned@*/ struct SpecStruct **buildArchitectureSpecs;
|
||||
char ** buildArchitectures;
|
||||
int buildArchitectureCount;
|
||||
|
@ -109,7 +109,7 @@ struct SpecStruct {
|
|||
int numSources;
|
||||
int noSource;
|
||||
|
||||
Header sourceHeader;
|
||||
/*@refcounted@*/ Header sourceHeader;
|
||||
int sourceCpioCount;
|
||||
/*@owned@*/ struct cpioFileMapping *sourceCpioList;
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ static inline struct speclines * newSl(void)
|
|||
return sl;
|
||||
}
|
||||
|
||||
static inline void freeSl(struct speclines *sl)
|
||||
static inline void freeSl(/*@only@*/struct speclines *sl)
|
||||
{
|
||||
int i;
|
||||
if (sl == NULL)
|
||||
|
@ -377,7 +377,7 @@ static inline struct spectags * newSt(void)
|
|||
return st;
|
||||
}
|
||||
|
||||
static inline void freeSt(struct spectags *st)
|
||||
static inline void freeSt(/*@only@*/struct spectags *st)
|
||||
{
|
||||
int i;
|
||||
if (st == NULL)
|
||||
|
|
76
po/rpm.pot
76
po/rpm.pot
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 1999-10-04 13:09-0400\n"
|
||||
"POT-Creation-Date: 1999-10-04 15:16-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -1372,81 +1372,81 @@ msgstr ""
|
|||
msgid "File listed twice: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:950
|
||||
#: build/files.c:951
|
||||
#, c-format
|
||||
msgid "File doesn't match prefix (%s): %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:960
|
||||
#: build/files.c:961
|
||||
#, c-format
|
||||
msgid "File not found: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1003
|
||||
#: build/files.c:1004
|
||||
#, c-format
|
||||
msgid "Bad owner/group: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1017
|
||||
#: build/files.c:1018
|
||||
#, c-format
|
||||
msgid "File %4d: %07o %s.%s\t %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1087
|
||||
#: build/files.c:1088
|
||||
#, c-format
|
||||
msgid "File needs leading \"/\": %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1131
|
||||
#: build/files.c:1132
|
||||
#, c-format
|
||||
msgid "File not found by glob: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1173
|
||||
#: build/files.c:1174
|
||||
msgid "Could not open %%files file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1180 build/pack.c:484
|
||||
#: build/files.c:1181 build/pack.c:485
|
||||
#, c-format
|
||||
msgid "line: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1507 build/parsePrep.c:29
|
||||
#: build/files.c:1508 build/parsePrep.c:29
|
||||
#, c-format
|
||||
msgid "Bad owner/group: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1561
|
||||
#: build/files.c:1562
|
||||
#, c-format
|
||||
msgid "Couldn't exec %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1566
|
||||
#: build/files.c:1567
|
||||
#, c-format
|
||||
msgid "Couldn't fork %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1648
|
||||
#: build/files.c:1649
|
||||
#, c-format
|
||||
msgid "%s failed"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1652
|
||||
#: build/files.c:1653
|
||||
#, c-format
|
||||
msgid "failed to write all data to %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1741
|
||||
#: build/files.c:1742
|
||||
#, c-format
|
||||
msgid "Finding %s: (using %s)...\n"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1769 build/files.c:1778
|
||||
#: build/files.c:1770 build/files.c:1779
|
||||
#, c-format
|
||||
msgid "Failed to find %s:"
|
||||
msgstr ""
|
||||
|
||||
#: build/files.c:1884
|
||||
#: build/files.c:1885
|
||||
#, c-format
|
||||
msgid "Processing files: %s-%s-%s\n"
|
||||
msgstr ""
|
||||
|
@ -1528,42 +1528,42 @@ msgstr ""
|
|||
msgid "create archive failed on file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:454
|
||||
#: build/pack.c:455
|
||||
#, c-format
|
||||
msgid "cpio_copy write failed: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:461
|
||||
#: build/pack.c:462
|
||||
#, c-format
|
||||
msgid "cpio_copy read failed: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:540
|
||||
#: build/pack.c:541
|
||||
#, c-format
|
||||
msgid "Could not open PreIn file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:547
|
||||
#: build/pack.c:548
|
||||
#, c-format
|
||||
msgid "Could not open PreUn file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:554
|
||||
#: build/pack.c:555
|
||||
#, c-format
|
||||
msgid "Could not open PostIn file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:561
|
||||
#: build/pack.c:562
|
||||
#, c-format
|
||||
msgid "Could not open PostUn file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:569
|
||||
#: build/pack.c:570
|
||||
#, c-format
|
||||
msgid "Could not open VerifyScript file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/pack.c:585
|
||||
#: build/pack.c:586
|
||||
#, c-format
|
||||
msgid "Could not open Trigger script file: %s"
|
||||
msgstr ""
|
||||
|
@ -1674,68 +1674,68 @@ msgstr ""
|
|||
msgid "Unknown icon type: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:323
|
||||
#: build/parsePreamble.c:324
|
||||
#, c-format
|
||||
msgid "line %d: Malformed tag: %s"
|
||||
msgstr ""
|
||||
|
||||
#. Empty field
|
||||
#: build/parsePreamble.c:331
|
||||
#: build/parsePreamble.c:332
|
||||
#, c-format
|
||||
msgid "line %d: Empty tag: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:354 build/parsePreamble.c:361
|
||||
#: build/parsePreamble.c:355 build/parsePreamble.c:362
|
||||
#, c-format
|
||||
msgid "line %d: Illegal char '-' in %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:399
|
||||
#: build/parsePreamble.c:400
|
||||
#, c-format
|
||||
msgid "line %d: BuildRoot can not be \"/\": %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:412
|
||||
#: build/parsePreamble.c:413
|
||||
#, c-format
|
||||
msgid "line %d: Prefixes must not end with \"/\": %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:424
|
||||
#: build/parsePreamble.c:425
|
||||
#, c-format
|
||||
msgid "line %d: Docdir must begin with '/': %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:436
|
||||
#: build/parsePreamble.c:437
|
||||
#, c-format
|
||||
msgid "line %d: Epoch/Serial field must be a number: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:499
|
||||
#: build/parsePreamble.c:500
|
||||
#, c-format
|
||||
msgid "line %d: Bad BuildArchitecture format: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:509
|
||||
#: build/parsePreamble.c:510
|
||||
#, c-format
|
||||
msgid "Internal error: Bogus tag %d"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:656
|
||||
#: build/parsePreamble.c:657
|
||||
#, c-format
|
||||
msgid "Bad package specification: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:662
|
||||
#: build/parsePreamble.c:663
|
||||
#, c-format
|
||||
msgid "Package already exists: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:689
|
||||
#: build/parsePreamble.c:690
|
||||
#, c-format
|
||||
msgid "line %d: Unknown tag: %s"
|
||||
msgstr ""
|
||||
|
||||
#: build/parsePreamble.c:714
|
||||
#: build/parsePreamble.c:715
|
||||
msgid "Spec file can't use BuildRoot"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -108,7 +108,8 @@ int poptReadConfigFile(poptContext con, const char * fn);
|
|||
int poptReadDefaultConfig(poptContext con, int useEnv);
|
||||
/* argv should be freed -- this allows ', ", and \ quoting, but ' is treated
|
||||
the same as " and both may include \ quotes */
|
||||
int poptParseArgvString(const char * s, int * argcPtr, char *** argvPtr);
|
||||
int poptParseArgvString(const char * s,
|
||||
/*@out@*/ int * argcPtr, /*@out@*/ char *** argvPtr);
|
||||
const char * poptStrerror(const int error);
|
||||
void poptSetExecPath(poptContext con, const char * path, int allowAbsolute);
|
||||
void poptPrintHelp(poptContext con, FILE * f, int flags);
|
||||
|
|
Loading…
Reference in New Issue