RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [email protected] Module: rpm Date: 17-May-2017 19:55:39 Branch: rpm-5_4 Handle: 2017051717553900 Modified files: (Branch: rpm-5_4) rpm build.c rpmqv.c Log: - splint: RIP. Summary: Revision Changes Path 2.124.4.9 +3 -17 rpm/build.c 1.167.4.14 +16 -41 rpm/rpmqv.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/build.c ============================================================================ $ cvs diff -u -r2.124.4.8 -r2.124.4.9 build.c --- rpm/build.c 28 Mar 2016 19:10:28 -0000 2.124.4.8 +++ rpm/build.c 17 May 2017 17:55:39 -0000 2.124.4.9 @@ -24,10 +24,6 @@ #include "debug.h" -/*@access rpmts @*/ /* XXX compared with NULL @*/ -/*@access rpmdb @*/ /* XXX compared with NULL @*/ -/*@access FD_t @*/ /* XXX compared with NULL @*/ - #ifdef __cplusplus #define QVA_ISSET(_qvaflags, _FLAG) ((_qvaflags) & (VERIFY_##_FLAG)) @@ -51,8 +47,6 @@ /** */ static int checkSpec(rpmts ts, Header h) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/ { int rc; @@ -78,8 +72,6 @@ /** */ static int isSpecFile(const char * specfile) - /*@globals h_errno, fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/ { char buf[256]; const char * s; @@ -102,15 +94,13 @@ case '\r': case '\n': checking = 1; - /*@switchbreak@*/ break; + break; case ':': checking = 0; - /*@switchbreak@*/ break; -/*@-boundsread@*/ + break; default: if (checking && !(isprint(*s) || isspace(*s))) return 0; - /*@switchbreak@*/ break; -/*@=boundsread@*/ + break; } } return 1; @@ -118,10 +108,7 @@ /** */ -/*@-boundswrite@*/ static int buildForTarget(rpmts ts, BTA_t ba) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/ { const char * passPhrase = ba->passPhrase; const char * cookie = ba->cookie; @@ -326,7 +313,6 @@ specURL = _free(specURL); return rc; } -/*@=boundswrite@*/ int build(rpmts ts, BTA_t ba, const char * rcfile) { @@ . patch -p0 <<'@@ .' Index: rpm/rpmqv.c ============================================================================ $ cvs diff -u -r1.167.4.13 -r1.167.4.14 rpmqv.c --- rpm/rpmqv.c 10 May 2017 16:24:03 -0000 1.167.4.13 +++ rpm/rpmqv.c 17 May 2017 17:55:39 -0000 1.167.4.14 @@ -5,7 +5,7 @@ #define _AUTOHELP -#if defined(IAM_RPM) || defined(__LCLINT__) +#if defined(IAM_RPM) #define IAM_RPMBT #define IAM_RPMDB #define IAM_RPMEIU @@ -164,7 +164,6 @@ #define MODES_FOR_ROOT (MODES_BT | MODES_IE | MODES_QV | MODES_DB | MODES_K) /* the structure describing the options we take and the defaults */ -/*@unchecked@*/ static struct poptOption optionsTable[] = { #ifdef IAM_RPMQV @@ -231,9 +230,7 @@ long _stksize = 64 * 1024L; #endif -/*@exits@*/ static void argerror(const char * desc) - /*@globals __assert_program_name, fileSystem @*/ - /*@modifies fileSystem @*/ +static void argerror(const char * desc) { fprintf(stderr, _("%s: %s\n"), __progname, desc); exit(EXIT_FAILURE); @@ -241,8 +238,6 @@ #ifdef DYING /* XXX rpmIsVerbose alone stops usage spewage with every --eval */ static void printVersion(FILE * fp) - /*@globals rpmEVR, fileSystem @*/ - /*@modifies *fp, fileSystem @*/ { fprintf(fp, "%s (" RPM_NAME ") %s\n", __progname, rpmEVR); if (rpmIsVerbose()) @@ -251,8 +246,6 @@ } static void printUsage(poptContext con, FILE * fp, int flags) - /*@globals rpmEVR, fileSystem, internalState @*/ - /*@modifies *fp, fileSystem, internalState @*/ { printVersion(fp); fprintf(fp, "\n"); @@ -447,17 +440,11 @@ } #endif -/*@-bounds@*/ /* LCL: segfault */ -/*@-mods@*/ /* FIX: shrug */ -#if !defined(__GLIBC__) && !defined(__LCLINT__) -int main(int argc, char *argv[], /*@unused@*/ char ** envp) +#if !defined(__GLIBC__) +int main(int argc, char *argv[], char ** envp) #else int main(int argc, char *argv[]) #endif - /*@globals rpmEVR, RPMVERSION, - rpmGlobalMacroContext, rpmCLIMacroContext, - h_errno, fileSystem, internalState@*/ - /*@modifies fileSystem, internalState@*/ { poptContext optCon = rpmcliInit(argc, (char *const *)argv, optionsTable); @@ -496,7 +483,7 @@ int xx; #endif -#if !defined(__GLIBC__) && !defined(__LCLINT__) +#if !defined(__GLIBC__) environ = envp; #else /* XXX limit the fiddle up to linux for now. */ @@ -506,7 +493,6 @@ #endif /* Set the major mode based on argv[0] */ - /*@-nullpass@*/ #ifdef IAM_RPMBT if (!strcmp(__progname, "rpmb")) bigMode = MODE_BUILD; if (!strcmp(__progname, "lt-rpmb")) bigMode = MODE_BUILD; @@ -526,7 +512,6 @@ if (!strcmp(__progname, "lt-rpmi")) bigMode = MODE_INSTALL; if (!strcmp(__progname, "rpmu")) bigMode = MODE_INSTALL; #endif - /*@=nullpass@*/ #if defined(IAM_RPMQV) /* Jumpstart option from argv[0] if necessary. */ @@ -750,7 +735,6 @@ || ka->sign #endif ) - /*@-branchstate@*/ { if (bigMode == MODE_REBUILD || bigMode == MODE_BUILD || bigMode == MODE_RESIGN || bigMode == MODE_TARBUILD) @@ -798,7 +782,6 @@ } } } - /*@=branchstate@*/ #endif /* IAM_RPMBT || IAM_RPMK */ if (rpmioPipeOutput) { @@ -896,7 +879,7 @@ ba->specFile = _free(ba->specFile); if (ec) - /*@loopbreak@*/ break; + break; } } break; @@ -924,33 +907,33 @@ #else if ((ba->buildChar == 'b') && ba->shortCircuit) #endif - /*@innerbreak@*/ break; + break; /*@fallthrough@*/ case 'i': ba->buildAmount |= RPMBUILD_INSTALL; ba->buildAmount |= RPMBUILD_CHECK; if ((ba->buildChar == 'i') && ba->shortCircuit) - /*@innerbreak@*/ break; + break; /*@fallthrough@*/ case 'c': ba->buildAmount |= RPMBUILD_BUILD; if ((ba->buildChar == 'c') && ba->shortCircuit) - /*@innerbreak@*/ break; + break; /*@fallthrough@*/ case 'p': ba->buildAmount |= RPMBUILD_PREP; - /*@innerbreak@*/ break; + break; case 'l': ba->buildAmount |= RPMBUILD_FILECHECK; - /*@innerbreak@*/ break; + break; case 's': ba->buildAmount |= RPMBUILD_PACKAGESOURCE; #if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) /* no-deps-on-building-srpms */ /* enforce no dependency checking when rolling a source RPM */ ba->noDeps = 1; #endif - /*@innerbreak@*/ break; + break; case 't': /* support extracting the "%track" script/section */ ba->buildAmount |= RPMBUILD_TRACK; /* enforce no dependency checking and expansion of %setup, %patch and %prep macros */ @@ -958,11 +941,11 @@ rpmDefineMacro(NULL, "setup #", RMIL_CMDLINE); rpmDefineMacro(NULL, "patch #", RMIL_CMDLINE); rpmDefineMacro(NULL, "prep %%prep", RMIL_CMDLINE); - /*@innerbreak@*/ break; + break; case 'f': ba->buildAmount |= RPMBUILD_FETCHSOURCE; ba->noDeps = 1; - /*@innerbreak@*/ break; + break; } if (!poptPeekArg(optCon)) { @@ -983,7 +966,7 @@ ba->cookie = NULL; ec = build(ts, ba, NULL); if (ec) - /*@loopbreak@*/ break; + break; } } break; #endif /* IAM_RPMBT */ @@ -1022,7 +1005,6 @@ if (ia->noDeps) IIF_SET(ia->installInterfaceFlags, NODEPS); /* we've already ensured !(!ia->prefix && !ia->relocations) */ - /*@-branchstate@*/ if (ia->qva_prefix) { xx = rpmfiAddRelocation(&ia->relocations, &ia->nrelocations, NULL, ia->qva_prefix); @@ -1032,7 +1014,6 @@ xx = rpmfiAddRelocation(&ia->relocations, &ia->nrelocations, NULL, NULL); } - /*@=branchstate@*/ if (!poptPeekArg(optCon)) { if (ia->rbtid == 0) @@ -1042,11 +1023,9 @@ ia->rbCheck = rpmcliInstallCheck; ia->rbOrder = rpmcliInstallOrder; ia->rbRun = rpmcliInstallRun; -/*@i@*/ ec += rpmRollback(ts, ia, NULL); + ec += rpmRollback(ts, ia, NULL); } else { - /*@-compdef -compmempass@*/ /* FIX: ia->relocations[0].newPath undefined */ ec += rpmcliInstall(ts, ia, (const char **)poptGetArgs(optCon)); - /*@=compdef =compmempass@*/ } break; @@ -1175,9 +1154,5 @@ rpmlog(RPMLOG_DEBUG, D_("exit code: %d\n"), ec); - /*@-globstate@*/ return ec; - /*@=globstate@*/ } -/*@=mods@*/ -/*@=bounds@*/ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository [email protected]
