RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   16-May-2017 22:14:31
  Branch: rpm-5_4                          Handle: 2017051620143001

  Modified files:           (Branch: rpm-5_4)
    rpm/build               build.c buildio.h expression.c files.c names.c
                            pack.c parseChangelog.c parseDescription.c
                            parseFiles.c parsePreamble.c parsePrep.c
                            parseReqs.c parseScript.c parseSpec.c poptBT.c
                            reqprov.c spec.c

  Log:
    - splint: RIP.

  Summary:
    Revision    Changes     Path
    2.145.2.5   +1  -8      rpm/build/build.c
    2.38.2.2    +8  -21     rpm/build/buildio.h
    2.35.6.10   +18 -53     rpm/build/expression.c
    1.369.2.15  +1  -4      rpm/build/files.c
    1.40.6.5    +1  -25     rpm/build/names.c
    2.324.2.21  +6  -83     rpm/build/pack.c
    2.50.6.3    +4  -15     rpm/build/parseChangelog.c
    2.44.4.6    +2  -10     rpm/build/parseDescription.c
    2.36.6.4    +2  -12     rpm/build/parseFiles.c
    2.194.2.16  +7  -60     rpm/build/parsePreamble.c
    2.132.2.12  +4  -45     rpm/build/parsePrep.c
    2.57.4.2    +0  -4      rpm/build/parseReqs.c
    2.80.2.7    +5  -16     rpm/build/parseScript.c
    2.143.4.8   +22 -66     rpm/build/parseSpec.c
    2.31.4.2    +4  -16     rpm/build/poptBT.c
    1.91.2.7    +2  -4      rpm/build/reqprov.c
    2.211.2.5   +19 -65     rpm/build/spec.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/build/build.c
  ============================================================================
  $ cvs diff -u -r2.145.2.4 -r2.145.2.5 build.c
  --- rpm/build/build.c 24 Jun 2016 19:04:19 -0000      2.145.2.4
  +++ rpm/build/build.c 16 May 2017 20:14:30 -0000      2.145.2.5
  @@ -51,14 +51,9 @@
       return dir;
   }
   
  -/*@access urlinfo @*/                /* XXX compared with NULL */
  -/*@access FD_t @*/
  -
   /**
    */
   static void doRmSource(Spec spec)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies rpmGlobalMacroContext, fileSystem, internalState  @*/
   {
       struct Source *sp;
       int rc;
  @@ -173,7 +168,7 @@
            if (xstrcasecmp(spec->foo[i].str, "track"))
                continue;
            iob = spec->foo[i].iob;
  -         /*@loopbreak@*/ break;
  +         break;
        }
        mTemplate = "%{__spec_track_template}";
        mPost = "%{__spec_track_post}";
  @@ -205,12 +200,10 @@
       else
        xfd = fd;
   
  -    /*@-type@*/ /* FIX: cast? */
       if ((fp = fdGetFp(xfd)) == NULL) {
        rc = RPMRC_FAIL;
        goto exit;
       }
  -    /*@=type@*/
   
       (void) urlPath(rootURL, &rootDir);
       if (*rootDir == '\0') rootDir = "/";
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/buildio.h
  ============================================================================
  $ cvs diff -u -r2.38.2.1 -r2.38.2.2 buildio.h
  --- rpm/build/buildio.h       27 Sep 2014 15:54:19 -0000      2.38.2.1
  +++ rpm/build/buildio.h       16 May 2017 20:14:30 -0000      2.38.2.2
  @@ -12,15 +12,13 @@
   
   /**
    */
  -typedef /*@abstract@*/ struct cpioSourceArchive_s {
  +typedef struct cpioSourceArchive_s * CSA_t;
  +struct cpioSourceArchive_s {
       rpmuint32_t      cpioArchiveSize;
  -/*@relnull@*/
       FD_t     cpioFdIn;
  -/*@refcounted@*/ /*@relnull@*/
       rpmfi    fi;
  -/*@only@*/
       struct rpmlead * lead;   /* XXX FIXME: exorcize lead/arch/os */
  -} * CSA_t;
  +};
   
   #ifdef __cplusplus
   extern "C" {
  @@ -36,15 +34,8 @@
    * @param csa                csa
    * @return           0 on success
    */
  -/*@unused@*/ int readRPM(/*@null@*/ const char * fileName,
  -             /*@out@*/ Spec * specp,
  -             /*@out@*/ void * l,
  -             /*@out@*/ Header * sigs,
  -             CSA_t csa)
  -     /*@globals rpmGlobalMacroContext, h_errno,
  -             fileSystem, internalState @*/
  -     /*@modifies *specp, *lead, *sigs, csa, csa->cpioFdIn,
  -             rpmGlobalMacroContext, fileSystem, internalState @*/;
  +int readRPM(const char * fileName, Spec * specp, void * l,
  +             Header * sigs, CSA_t csa);
   #endif
   
   /**
  @@ -62,15 +53,11 @@
    * @param _dig               DSA keypair for auto-signing (or NULL)
    * @return           RPMRC_OK on success
    */
  -rpmRC writeRPM(Header * hdrp, /*@null@*/ unsigned char ** pkgidp,
  +rpmRC writeRPM(Header * hdrp, unsigned char ** pkgidp,
                const char * fileName,
                CSA_t csa,
  -             /*@null@*/ char * passPhrase,
  -             /*@out@*/ const char ** cookie, void * _dig)
  -     /*@globals rpmGlobalMacroContext, h_errno,
  -             fileSystem, internalState @*/
  -     /*@modifies *hdrp, *pkgidp, *cookie, csa, csa->cpioArchiveSize,
  -             rpmGlobalMacroContext, fileSystem, internalState @*/;
  +             char * passPhrase,
  +             const char ** cookie, void * _dig);
   
   #ifdef __cplusplus
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/expression.c
  ============================================================================
  $ cvs diff -u -r2.35.6.9 -r2.35.6.10 expression.c
  --- rpm/build/expression.c    29 Mar 2016 16:40:30 -0000      2.35.6.9
  +++ rpm/build/expression.c    16 May 2017 20:14:30 -0000      2.35.6.10
  @@ -44,7 +44,6 @@
   /**
    */
   static Value valueMakeInteger(int i)
  -     /*@*/
   {
       Value v;
   
  @@ -56,8 +55,7 @@
   
   /**
    */
  -static Value valueMakeString(/*@only@*/ const char *s)
  -     /*@*/
  +static Value valueMakeString(const char *s)
   {
       Value v;
   
  @@ -69,8 +67,7 @@
   
   /**
    */
  -static void valueFree( /*@only@*/ Value v)
  -     /*@modifies v @*/
  +static void valueFree( Value v)
   {
       if (v) {
        if (v->type == VALUE_TYPE_STRING)
  @@ -82,7 +79,6 @@
   
   #ifdef DEBUG_PARSER
   static void valueDump(const char *msg, Value v, FILE *fp)
  -     /*@*/
   {
       if (msg)
        fprintf(fp, "%s ", msg);
  @@ -105,17 +101,13 @@
    * Parser state.
    */
   typedef struct _parseState {
  -/*@owned@*/
       char *str;               /*!< expression string */
  -/*@dependent@*/
       char *p;         /*!< current position in expression string */
       int nextToken;   /*!< current lookahead token */
  -/*@relnull@*/
       Value tokenValue;        /*!< valid when TOK_INTEGER or TOK_STRING */
       Spec spec;               /*!< spec file that we are parsing inside of */
   } *ParseState;
   
  -
   /**
    * \name Parser tokens
    */
  @@ -173,7 +165,6 @@
   };
   
   static const char *prToken(int val)
  -     /*@*/
   {
       ETTE_t *et;
       
  @@ -189,9 +180,6 @@
    * @param state              expression parser state
    */
   static int rdToken(ParseState state)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies state->nextToken, state->p, state->tokenValue,
  -             rpmGlobalMacroContext, internalState @*/
   {
       int token;
       Value v = NULL;
  @@ -325,20 +313,12 @@
       return 0;
   }
   
  -/*@null@*/
  -static Value doLogical(ParseState state)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies state->nextToken, state->p, state->tokenValue,
  -             rpmGlobalMacroContext, internalState @*/;
  +static Value doLogical(ParseState state);
   
   /**
    * @param state              expression parser state
    */
  -/*@null@*/
   static Value doPrimary(ParseState state)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies state->nextToken, state->p, state->tokenValue,
  -             rpmGlobalMacroContext, internalState @*/
   {
       Value v;
   
  @@ -410,7 +390,7 @@
        break;
       default:
        return NULL;
  -     /*@notreached@*/ break;
  +     break;
       }
   
       DEBUG(valueDump("doPrimary:", v, stdout));
  @@ -420,11 +400,7 @@
   /**
    * @param state              expression parser state
    */
  -/*@null@*/
   static Value doMultiplyDivide(ParseState state)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies state->nextToken, state->p, state->tokenValue,
  -             rpmGlobalMacroContext, internalState @*/
   {
       Value v1, v2 = NULL;
   
  @@ -481,11 +457,7 @@
   /**
    * @param state              expression parser state
    */
  -/*@null@*/
   static Value doAddSubtract(ParseState state)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies state->nextToken, state->p, state->tokenValue,
  -             rpmGlobalMacroContext, internalState @*/
   {
       Value v1, v2 = NULL;
   
  @@ -548,11 +520,7 @@
   /**
    * @param state              expression parser state
    */
  -/*@null@*/
   static Value doRelational(ParseState state)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies state->nextToken, state->p, state->tokenValue,
  -             rpmGlobalMacroContext, internalState @*/
   {
       Value v1 = NULL;
       Value v2 = NULL;
  @@ -588,24 +556,24 @@
            switch (op) {
            case TOK_EQ:
                r = (i1 == i2);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_NEQ:
                r = (i1 != i2);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_LT:
                r = (i1 < i2);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_LE:
                r = (i1 <= i2);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_GT:
                r = (i1 > i2);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_GE:
                r = (i1 >= i2);
  -             /*@switchbreak@*/ break;
  +             break;
            default:
  -             /*@switchbreak@*/ break;
  +             break;
            }
        } else {
            const char * s1 = v1->data.s;
  @@ -613,24 +581,24 @@
            switch (op) {
            case TOK_EQ:
                r = (strcmp(s1,s2) == 0);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_NEQ:
                r = (strcmp(s1,s2) != 0);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_LT:
                r = (strcmp(s1,s2) < 0);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_LE:
                r = (strcmp(s1,s2) <= 0);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_GT:
                r = (strcmp(s1,s2) > 0);
  -             /*@switchbreak@*/ break;
  +             break;
            case TOK_GE:
                r = (strcmp(s1,s2) >= 0);
  -             /*@switchbreak@*/ break;
  +             break;
            default:
  -             /*@switchbreak@*/ break;
  +             break;
            }
        }
        valueFree(v1);
  @@ -650,9 +618,6 @@
    * @param state              expression parser state
    */
   static Value doLogical(ParseState state)
  -     /*@globals rpmGlobalMacroContext, h_errno @*/
  -     /*@modifies state->nextToken, state->p, state->tokenValue,
  -             rpmGlobalMacroContext @*/
   {
       Value v1 = NULL;
       Value v2 = NULL;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/files.c
  ============================================================================
  $ cvs diff -u -r1.369.2.14 -r1.369.2.15 files.c
  --- rpm/build/files.c 5 May 2017 17:32:28 -0000       1.369.2.14
  +++ rpm/build/files.c 16 May 2017 20:14:30 -0000      1.369.2.15
  @@ -950,9 +950,6 @@
            }
            break;
        }
  -#if defined(__LCLINT__)
  -     assert(s != NULL);
  -#endif
   
       /* Set flags for virtual file attributes */
       {        VFA_t *vfa;
  @@ -1304,7 +1301,7 @@
        he->p.ui32p = &dalgo;
        he->c = 1;
        xx = headerPut(h, he, 0);
  -     /*@fallthgrough@*/
  +     /*@fallthrough@*/
       case PGPHASHALGO_RIPEMD160:
       case PGPHASHALGO_TIGER192:
       case PGPHASHALGO_MD4:
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/names.c
  ============================================================================
  $ cvs diff -u -r1.40.6.4 -r1.40.6.5 names.c
  --- rpm/build/names.c 13 Apr 2017 15:21:21 -0000      1.40.6.4
  +++ rpm/build/names.c 16 May 2017 20:14:31 -0000      1.40.6.5
  @@ -1,4 +1,3 @@
  -/*@-mods@*/
   /** \ingroup rpmbuild
    * \file build/names.c
    * Simple user/group name/id cache (plus hostname and buildtime)
  @@ -13,20 +12,14 @@
   #include "rpmbuild.h"
   #include "debug.h"
   
  -typedef /*@owned@*/ /*@null@*/ const char * ugstr_t;
  +typedef const char * ugstr_t;
   
  -/*@unchecked@*/
   static uid_t uids[1024];
  -/*@unchecked@*/
   static ugstr_t unames[1024];
  -/*@unchecked@*/
   static int uid_used = 0;
   
  -/*@unchecked@*/
   static gid_t gids[1024];
  -/*@unchecked@*/
   static ugstr_t gnames[1024];
  -/*@unchecked@*/
   static int gid_used = 0;
       
   void freeNames(void)
  @@ -39,8 +32,6 @@
   }
   
   const char *getUname(uid_t uid)
  -     /*@globals uid_used, uids, unames @*/
  -     /*@modifies uid_used, uids, unames @*/
   {
       struct passwd *pw;
       int x;
  @@ -63,8 +54,6 @@
   }
   
   const char *getUnameS(const char *uname)
  -     /*@globals uid_used, uids, unames @*/
  -     /*@modifies uid_used, uids, unames @*/
   {
       struct passwd *pw;
       int x;
  @@ -90,8 +79,6 @@
   }
   
   uid_t getUidS(const char *uname)
  -     /*@globals uid_used, uids, unames @*/
  -     /*@modifies uid_used, uids, unames @*/
   {
       struct passwd *pw;
       int x;
  @@ -117,8 +104,6 @@
   }
   
   const char *getGname(gid_t gid)
  -     /*@globals gid_used, gids, gnames @*/
  -     /*@modifies gid_used, gids, gnames @*/
   {
       struct group *gr;
       int x;
  @@ -141,8 +126,6 @@
   }
   
   const char *getGnameS(const char *gname)
  -     /*@globals gid_used, gids, gnames @*/
  -     /*@modifies gid_used, gids, gnames @*/
   {
       struct group *gr;
       int x;
  @@ -168,8 +151,6 @@
   }
   
   gid_t getGidS(const char *gname)
  -     /*@globals gid_used, gids, gnames @*/
  -     /*@modifies gid_used, gids, gnames @*/
   {
       struct group *gr;
       int x;
  @@ -238,11 +219,7 @@
   
       if (! oneshot) {
           (void) gethostname(hostname, sizeof(hostname));
  -     /*@-unrecog -multithreaded @*/
  -     /*@-globs@*/    /* FIX: h_errno access */
        hbn = gethostbyname(hostname);
  -     /*@=globs@*/
  -     /*@=unrecog =multithreaded @*/
        if (hbn) {
            strncpy(hostname, hbn->h_name, sizeof(hostname)-1);
            hostname[sizeof(hostname)-1] = '\0';
  @@ -253,4 +230,3 @@
       }
       return(hostname);
   }
  -/*@=mods@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/pack.c
  ============================================================================
  $ cvs diff -u -r2.324.2.20 -r2.324.2.21 pack.c
  --- rpm/build/pack.c  11 Apr 2017 17:04:52 -0000      2.324.2.20
  +++ rpm/build/pack.c  16 May 2017 20:14:31 -0000      2.324.2.21
  @@ -28,20 +28,11 @@
   
   #include "debug.h"
   
  -/*@access rpmts @*/
  -/*@access rpmfi @*/  /* compared with NULL */
  -/*@access Header @*/ /* compared with NULL */
  -/*@access FD_t @*/   /* compared with NULL */
  -/*@access CSA_t @*/
  -
   /**
    * @todo Create transaction set *much* earlier.
    */
  -static rpmRC cpio_doio(FD_t fdo, /*@unused@*/ Header h, CSA_t csa,
  +static rpmRC cpio_doio(FD_t fdo, Header h, CSA_t csa,
                const char * payload_format, const char * fmodeMacro)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies fdo, csa, rpmGlobalMacroContext,
  -             fileSystem, internalState @*/
   {
       rpmts ts = rpmtsCreate();
       rpmfi fi = csa->fi;
  @@ -55,10 +46,8 @@
            fmode = _free(fmode);
            fmode = xstrdup("w9.gzdio");
        }
  -     /*@-nullpass@*/
        (void) Fflush(fdo);
        cfd = Fdopen(fdDup(Fileno(fdo)), fmode);
  -     /*@=nullpass@*/
        fmode = _free(fmode);
       }
       if (cfd == NULL)
  @@ -93,8 +82,6 @@
   /**
    */
   static rpmRC cpio_copy(FD_t fdo, CSA_t csa)
  -     /*@globals fileSystem, internalState @*/
  -     /*@modifies fdo, csa, fileSystem, internalState @*/
   {
       char buf[BUFSIZ];
       size_t nb;
  @@ -117,10 +104,8 @@
   
   /**
    */
  -static /*@only@*/ /*@null@*/ rpmiob addFileToTagAux(Spec spec,
  -             const char * file, /*@only@*/ rpmiob iob)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
  +static rpmiob addFileToTagAux(Spec spec,
  +             const char * file, rpmiob iob)
   {
       char buf[BUFSIZ];
       const char * fn = buf;
  @@ -135,9 +120,7 @@
        iob = rpmiobFree(iob);
        return NULL;
       }
  -    /*@-type@*/ /* FIX: cast? */
       if ((f = fdGetFp(fd)) != NULL)
  -    /*@=type@*/
       while (fgets(buf, (int)sizeof(buf), f)) {
        /* XXX display fn in error msg */
        if (expandMacros(spec, spec->macros, buf, sizeof(buf))) {
  @@ -155,8 +138,6 @@
   /**
    */
   static int addFileToTag(Spec spec, const char * file, Header h, rpmTag tag)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies h, rpmGlobalMacroContext, fileSystem, internalState @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       rpmiob iob = rpmiobNew(0);
  @@ -186,8 +167,6 @@
   /**
    */
   static int addFileToArrayTag(Spec spec, const char *file, Header h, rpmTag 
tag)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies h, rpmGlobalMacroContext, fileSystem, internalState  @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       rpmiob iob = rpmiobNew(0);
  @@ -212,9 +191,6 @@
   }
   
   rpmRC processScriptFiles(Spec spec, Package pkg)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies pkg->header, rpmGlobalMacroContext,
  -             fileSystem, internalState @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       struct TriggerFileEntry *p;
  @@ -303,7 +279,6 @@
                return RPMRC_FAIL;
            }
        } else {
  -         /*@observer@*/
            static const char *bull = "";
            he->tag = RPMTAG_TRIGGERSCRIPTS;
            he->t = RPM_STRING_ARRAY_TYPE;
  @@ -359,7 +334,6 @@
        return RPMRC_FAIL;
       }
       msg = _free(msg);
  -    /*@=sizeoftype@*/
   
       /* XXX FIXME: EPIPE on <stdin> */
       if (Fseek(fdi, 0, SEEK_SET) == -1) {
  @@ -380,10 +354,8 @@
       {        rpmts ts = rpmtsCreate();
   
        /* XXX W2DO? pass fileName? */
  -     /*@-mustmod@*/      /* LCL: segfault */
        rc = rpmReadPackageFile(ts, fdi, "readRPM",
                         &spec->packages->header);
  -     /*@=mustmod@*/
   
        (void)rpmtsFree(ts); 
        ts = NULL;
  @@ -405,7 +377,7 @@
        rpmlog(RPMLOG_ERR, _("readRPM: reading header from %s\n"),
                (fileName ? fileName : "<stdin>"));
        return RPMRC_FAIL;
  -     /*@notreached@*/ break;
  +     break;
       }
   
       if (specp)
  @@ -425,12 +397,9 @@
   #if defined(DEAD)
   #define      RPMPKGVERSION_MIN       30004
   #define      RPMPKGVERSION_MAX       40003
  -/*@unchecked@*/
   static int rpmpkg_version = -1;
   
   static int rpmLeadVersion(void)
  -     /*@globals rpmpkg_version, rpmGlobalMacroContext, h_errno @*/
  -     /*@modifies rpmpkg_version, rpmGlobalMacroContext @*/
   {
       int rpmlead_version;
   
  @@ -514,9 +483,7 @@
        * If no provides at all are available, we can just add.
        */
       he->tag = RPMTAG_PROVIDENAME;
  -/*@-nullstate@*/
       xx = headerGet(h, he, 0);
  -/*@=nullstate@*/
       provides = he->p.argv;
       providesCount = he->c;
       if (!xx)
  @@ -526,13 +493,10 @@
        * Otherwise, fill in entries on legacy packages.
        */
       he->tag = RPMTAG_PROVIDEVERSION;
  -/*@-nullstate@*/
       xx = headerGet(h, he, 0);
  -/*@=nullstate@*/
       providesEVR = he->p.argv;
       if (!xx) {
        for (i = 0; i < providesCount; i++) {
  -         /*@observer@*/
            static const char * vdummy = "";
            static rpmsenseFlags fdummy = RPMSENSE_ANY;
   
  @@ -541,9 +505,7 @@
            he->p.argv = &vdummy;
            he->c = 1;
            he->append = 1;
  -/*@-nullstate@*/
            xx = headerPut(h, he, 0);
  -/*@=nullstate@*/
            he->append = 0;
   
            he->tag = RPMTAG_PROVIDEFLAGS;
  @@ -551,21 +513,16 @@
            he->p.ui32p = (void *) &fdummy;
            he->c = 1;
            he->append = 1;
  -/*@-nullstate@*/
            xx = headerPut(h, he, 0);
  -/*@=nullstate@*/
            he->append = 0;
        }
        goto exit;
       }
   
       he->tag = RPMTAG_PROVIDEFLAGS;
  -/*@-nullstate@*/
       xx = headerGet(h, he, 0);
  -/*@=nullstate@*/
       provideFlags = he->p.ui32p;
   
  -    /*@-nullderef@*/ /* LCL: providesEVR is not NULL */
       if (provides && providesEVR && provideFlags)
       for (i = 0; i < providesCount; i++) {
           if (!(provides[i] && providesEVR[i]))
  @@ -576,14 +533,11 @@
        bingo = 0;
        break;
       }
  -    /*@=nullderef@*/
   
   exit:
  -/*@-usereleased@*/
       provides = _free(provides);
       providesEVR = _free(providesEVR);
       provideFlags = _free(provideFlags);
  -/*@=usereleased@*/
   
       if (bingo) {
        he->tag = RPMTAG_PROVIDENAME;
  @@ -591,9 +545,7 @@
        he->p.argv = &N;
        he->c = 1;
        he->append = 1;
  -/*@-nullstate@*/
        xx = headerPut(h, he, 0);
  -/*@=nullstate@*/
        he->append = 0;
   
        he->tag = RPMTAG_PROVIDEVERSION;
  @@ -601,9 +553,7 @@
        he->p.argv = &pEVR;
        he->c = 1;
        he->append = 1;
  -/*@-nullstate@*/
        xx = headerPut(h, he, 0);
  -/*@=nullstate@*/
        he->append = 0;
   
        he->tag = RPMTAG_PROVIDEFLAGS;
  @@ -611,9 +561,7 @@
        he->p.ui32p = &pFlags;
        he->c = 1;
        he->append = 1;
  -/*@-nullstate@*/
        xx = headerPut(h, he, 0);
  -/*@=nullstate@*/
        he->append = 0;
       }
       N = _free(N);
  @@ -626,7 +574,6 @@
    */
   static
   unsigned char nibble(char c)
  -     /*@*/
   {
       if (c >= '0' && c <= '9')
        return (unsigned char) (c - '0');
  @@ -1094,7 +1041,6 @@
   }
   
   static int rpmlibMarkers(Header h)
  -     /*@modifies h @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       rpmuint32_t val;
  @@ -1145,7 +1091,6 @@
       return 0;
   }
   
  -/*@unchecked@*/
   static rpmTag copyTags[] = {
       RPMTAG_CHANGELOGTIME,
       RPMTAG_CHANGELOGNAME,
  @@ -1245,12 +1190,12 @@
                    switch(errno) {
                    case  ENOENT:
                        if (rpmioMkpath(dn, 0755, -1, -1) == 0)
  -                         /*@switchbreak@*/ break;
  +                         break;
                        /*@fallthrough@*/
                    default:
                        rpmlog(RPMLOG_ERR,_("cannot create %s: %s\n"),
                            dn, strerror(errno));
  -                     /*@switchbreak@*/ break;
  +                     break;
                    }
                }
                dn = _free(dn);
  @@ -1260,26 +1205,16 @@
   
        memset(csa, 0, sizeof(*csa));
        csa->cpioArchiveSize = 0;
  -     /*@-type@*/ /* LCL: function typedefs */
  -/*@-onlytrans@*/
        csa->cpioFdIn = fdNew("init (packageBinaries)");
  -/*@=onlytrans@*/
  -/*@-assignexpose -newreftrans@*/
        csa->fi = rpmfiLink(pkg->fi, "packageBinaries");
  -/*@=assignexpose =newreftrans@*/
   assert(csa->fi != NULL);
   
        rc = writeRPM(&pkg->header, NULL, fn,
                    csa, spec->passPhrase, NULL, spec->dig);
   
  -/*@-onlytrans@*/
        csa->fi->te = _free(csa->fi->te);       /* XXX memory leak */
  -/*@=onlytrans@*/
        csa->fi = rpmfiFree(csa->fi);
  -/*@-nullpass -onlytrans -refcounttrans @*/
        csa->cpioFdIn = fdFree(csa->cpioFdIn, "init (packageBinaries)");
  -/*@=nullpass =onlytrans =refcounttrans @*/
  -     /*@=type@*/
        if (rc == RPMRC_OK) {
            /* Do check each written package if enabled */
            char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
  @@ -1382,9 +1317,7 @@
            he->c = argvCount(av);
            xx = headerPut(spec->sourceHeader, he, 0);
        }
  -/*@-nullstate@*/
        av = argvFree(av);
  -/*@=nullstate@*/
       }
   
       spec->cookie = _free(spec->cookie);
  @@ -1398,13 +1331,8 @@
   
        memset(csa, 0, sizeof(*csa));
        csa->cpioArchiveSize = 0;
  -     /*@-type@*/ /* LCL: function typedefs */
  -/*@-onlytrans@*/
        csa->cpioFdIn = fdNew("init (packageSources)");
  -/*@=onlytrans@*/
  -/*@-assignexpose -newreftrans@*/
        csa->fi = rpmfiLink(spec->fi, "packageSources");
  -/*@=assignexpose =newreftrans@*/
   #ifdef       DYING
   assert(csa->fi != NULL);
   #else
  @@ -1425,14 +1353,9 @@
            rc = checkPackages(pkgcheck);
        }
   
  -/*@-onlytrans@*/
        csa->fi->te = _free(csa->fi->te);       /* XXX memory leak */
  -/*@=onlytrans@*/
        csa->fi = rpmfiFree(csa->fi);
  -/*@-nullpass -onlytrans -refcounttrans @*/
        csa->cpioFdIn = fdFree(csa->cpioFdIn, "init (packageSources)");
  -/*@=nullpass =onlytrans =refcounttrans @*/
  -     /*@=type@*/
        srcrpmdir = _free(srcrpmdir);
        fn = _free(fn);
        pkgcheck = _free(pkgcheck);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseChangelog.c
  ============================================================================
  $ cvs diff -u -r2.50.6.2 -r2.50.6.3 parseChangelog.c
  --- rpm/build/parseChangelog.c        15 Apr 2012 15:04:14 -0000      2.50.6.2
  +++ rpm/build/parseChangelog.c        16 May 2017 20:14:31 -0000      2.50.6.3
  @@ -51,19 +51,18 @@
    * @retval secs              secs since the unix epoch
    * @return           0 on success, -1 on error
    */
  -static int dateToTimet(const char * datestr, /*@out@*/ time_t * secs)
  -     /*@modifies *secs @*/
  +static int dateToTimet(const char * datestr, time_t * secs)
   {
       struct tm time;
       time_t timezone_offset;
       char * p, * pe, * q, ** idx;
       char * date = strcpy(alloca(strlen(datestr) + 1), datestr);
  -/*@observer@*/ static char * days[] =
  +    static char * days[] =
        { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL };
  -/*@observer@*/ static char * months[] =
  +    static char * months[] =
        { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
          "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL };
  -/*@observer@*/ static char lengths[] =
  +    static char lengths[] =
        { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
       
       memset(&time, 0, sizeof(time));
  @@ -112,9 +111,7 @@
       if (*secs == -1) return -1;
   
       /* determine timezone offset */
  -/*@-nullpass@*/              /* gmtime(3) unlikely to return NULL soon. */
       timezone_offset = mktime(gmtime(secs)) - *secs;
  -/*@=nullpass@*/
   
       /* adjust to UTC */
       *secs += timezone_offset;
  @@ -122,9 +119,7 @@
       return 0;
   }
   
  -/*@-redecl@*/
   extern time_t get_date(const char * p, void * now);     /* XXX expedient 
lies */
  -/*@=redecl@*/
   
   /**
    * Add %changelog section to header.
  @@ -133,8 +128,6 @@
    * @return           RPMRC_OK on success
    */
   static rpmRC addChangelog(Header h, rpmiob iob)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies h, rpmGlobalMacroContext, internalState @*/
   {
       char * s = rpmiobStr(iob);
       char * se;
  @@ -155,9 +148,7 @@
            if (res >= 0 && *te == '\0') {
                last = res;             /* truncate to no. of entries. */
            } else {
  -/*@-moduncon@*/
                res = (long)get_date (t, NULL);
  -/*@=moduncon@*/
                /* XXX malformed date string silently ignored. */
                if (res > 0) {
                    last = res;         /* truncate to date. */
  @@ -184,9 +175,7 @@
            rpmlog(RPMLOG_ERR, _("incomplete %%changelog entry\n"));
            return RPMRC_FAIL;
        }
  -/*@-modobserver@*/
        *s = '\0';
  -/*@=modobserver@*/
        text = s + 1;
        
        /* 4 fields of date */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseDescription.c
  ============================================================================
  $ cvs diff -u -r2.44.4.5 -r2.44.4.6 parseDescription.c
  --- rpm/build/parseDescription.c      24 Jun 2016 19:04:19 -0000      2.44.4.5
  +++ rpm/build/parseDescription.c      16 May 2017 20:14:31 -0000      2.44.4.6
  @@ -11,18 +11,12 @@
   #include "rpmbuild.h"
   #include "debug.h"
   
  -/*@-exportheadervar@*/
  -/*@unchecked@*/
   extern int noLang;
  -/*@=exportheadervar@*/
   
   /* These have to be global scope to make up for *stupid* compilers */
  -/*@unchecked@*/
  -    /*@observer@*/ /*@null@*/ static const char *name = NULL;
  -/*@unchecked@*/
  -    /*@observer@*/ /*@null@*/ static const char *lang = NULL;
  +    static const char *name = NULL;
  +    static const char *lang = NULL;
   
  -/*@unchecked@*/
       static struct poptOption optionsTable[] = {
        { NULL, 'n', POPT_ARG_STRING, &name, 0, NULL, NULL},
        { NULL, 'l', POPT_ARG_STRING, &lang, 0, NULL, NULL},
  @@ -30,8 +24,6 @@
       };
   
   int parseDescription(Spec spec)
  -     /*@globals name, lang @*/
  -     /*@modifies name, lang @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       rpmParseState nextPart = (rpmParseState) RPMRC_FAIL; /* assume error */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseFiles.c
  ============================================================================
  $ cvs diff -u -r2.36.6.3 -r2.36.6.4 parseFiles.c
  --- rpm/build/parseFiles.c    24 Jun 2016 19:04:19 -0000      2.36.6.3
  +++ rpm/build/parseFiles.c    16 May 2017 20:14:31 -0000      2.36.6.4
  @@ -11,14 +11,8 @@
   #include "rpmbuild.h"
   #include "debug.h"
   
  -/*@access poptContext @*/    /* compared with NULL */
  -
  -/* These have to be global scope to make up for *stupid* compilers */
  -/*@unchecked@*/
  -    /*@observer@*/ /*@null@*/ static const char *name = NULL;
  -/*@unchecked@*/
  -    /*@observer@*/ /*@null@*/ static const char *file = NULL;
  -/*@unchecked@*/
  +    static const char *name = NULL;
  +    static const char *file = NULL;
       static struct poptOption optionsTable[] = {
        { NULL, 'n', POPT_ARG_STRING, &name, 'n',       NULL, NULL},
        { NULL, 'f', POPT_ARG_STRING, &file, 'f',       NULL, NULL},
  @@ -35,10 +29,8 @@
       int flag = PART_SUBNAME;
       poptContext optCon = NULL;
   
  -    /*@-mods@*/
       name = NULL;
       file = NULL;
  -    /*@=mods@*/
   
       if ((rc = poptParseArgvString(spec->line, &argc, &argv))) {
        rpmlog(RPMLOG_ERR, _("line %d: Error parsing %%files: %s\n"),
  @@ -64,10 +56,8 @@
       }
   
       if (poptPeekArg(optCon)) {
  -     /*@-mods@*/
        if (name == NULL)
            name = poptGetArg(optCon);
  -     /*@=mods@*/
        if (poptPeekArg(optCon)) {
            rpmlog(RPMLOG_ERR, _("line %d: Too many names: %s\n"),
                     spec->lineNum,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parsePreamble.c
  ============================================================================
  $ cvs diff -u -r2.194.2.15 -r2.194.2.16 parsePreamble.c
  --- rpm/build/parsePreamble.c 24 Jun 2016 19:04:19 -0000      2.194.2.15
  +++ rpm/build/parsePreamble.c 16 May 2017 20:14:31 -0000      2.194.2.16
  @@ -17,12 +17,8 @@
   #include <rpmbuild.h>
   #include "debug.h"
   
  -/*@access FD_t @*/   /* compared with NULL */
  -/*@access headerTagIndices @*/       /* rpmTags->aTags */
  -
   /**
    */
  -/*@observer@*/ /*@unchecked@*/
   static rpmTag copyTagsDuringParse[] = {
       RPMTAG_EPOCH,
       RPMTAG_VERSION,
  @@ -59,7 +55,6 @@
   
   /**
    */
  -/*@observer@*/ /*@unchecked@*/
   static rpmTag requiredTags[] = {
       RPMTAG_NAME,
       RPMTAG_VERSION,
  @@ -73,7 +68,6 @@
   /**
    */
   static void addOrAppendListEntry(Header h, rpmTag tag, char * line)
  -     /*@modifies h @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       int xx;
  @@ -98,10 +92,8 @@
   
   /**
    */
  -static int parseSimplePart(Spec spec, /*@out@*/char ** Np,
  -             /*@out@*/rpmParseState *flag)
  -     /*@globals internalState@*/
  -     /*@modifies *Np, *flag, internalState, spec->line @*/
  +static int parseSimplePart(Spec spec, char ** Np,
  +             rpmParseState *flag)
   {
       char * s, * se;
       int rc = 0;              /* assume failure */
  @@ -145,7 +137,6 @@
   /**
    */
   static inline int parseYesNo(const char * s)
  -     /*@*/
   {
       return ((!s || (s[0] == 'n' || s[0] == 'N' || s[0] == '0') ||
        !xstrcasecmp(s, "false") || !xstrcasecmp(s, "off"))
  @@ -153,14 +144,12 @@
   }
   
   typedef struct tokenBits_s {
  -/*@observer@*/ /*@null@*/
       const char * name;
       rpmsenseFlags bits;
   } * tokenBits;
   
   /**
    */
  -/*@observer@*/ /*@unchecked@*/
   static struct tokenBits_s installScriptBits[] = {
       { "interp",              RPMSENSE_INTERP },
       { "preun",               RPMSENSE_SCRIPT_PREUN },
  @@ -175,7 +164,6 @@
   
   /**
    */
  -/*@observer@*/ /*@unchecked@*/
   static struct tokenBits_s buildScriptBits[] = {
       { "prep",                RPMSENSE_SCRIPT_PREP },
       { "build",               RPMSENSE_SCRIPT_BUILD },
  @@ -188,8 +176,7 @@
   /**
    */
   static int parseBits(const char * s, const tokenBits tokbits,
  -             /*@out@*/ rpmsenseFlags * bp)
  -     /*@modifies *bp @*/
  +             rpmsenseFlags * bp)
   {
       tokenBits tb;
       const char * se;
  @@ -206,7 +193,7 @@
            for (tb = tokbits; tb->name; tb++) {
                if (tb->name != NULL &&
                    strlen(tb->name) == (size_t)(se-s) && !strncmp(tb->name, s, 
(se-s)))
  -                 /*@innerbreak@*/ break;
  +                 break;
            }
            if (tb->name == NULL)
                break;
  @@ -223,9 +210,7 @@
   
   /**
    */
  -/*@null@*/
   static inline char * findLastChar(char * s)
  -     /*@modifies *s @*/
   {
       char *se = s + strlen(s);
   
  @@ -238,16 +223,12 @@
        while (--se > s && strchr(" \t\n\r", *se) != NULL)
            *se = '\0';
       }
  -/*@-temptrans -retalias @*/
       return se;
  -/*@=temptrans =retalias @*/
   }
   
   /**
    */
   static int isMemberInEntry(Header h, const char *name, rpmTag tag)
  -     /*@globals internalState @*/
  -     /*@modifies internalState @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       int rc = -1;
  @@ -272,8 +253,6 @@
   /**
    */
   static int checkForValidArchitectures(Spec spec)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies rpmGlobalMacroContext, internalState @*/
   {
       const char *arch = rpmExpand("%{_target_cpu}", NULL);
       const char *os = rpmExpand("%{_target_os}", NULL);
  @@ -309,7 +288,6 @@
    * @return           RPMRC_OK if OK
    */
   static rpmRC checkForRequired(Header h, const char * NVR)
  -     /*@*/
   {
       rpmTag * p;
       rpmRC rc = RPMRC_OK;
  @@ -333,8 +311,6 @@
    * @return           RPMRC_OK if OK
    */
   static rpmRC checkForDuplicates(Header h, const char * NVR)
  -     /*@globals internalState @*/
  -     /*@modifies h, internalState @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       HeaderIterator hi;
  @@ -360,10 +336,8 @@
   
   /**
    */
  -/*@observer@*/ /*@unchecked@*/
   static struct optionalTag {
       rpmTag   ot_tag;
  -/*@observer@*/ /*@null@*/
       const char * ot_mac;
   } optionalTags[] = {
       { RPMTAG_VENDOR,         "%{vendor}" },
  @@ -380,8 +354,6 @@
   /**
    */
   static void fillOutMainPackage(Header h)
  -     /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  -     /*@modifies h, rpmGlobalMacroContext, internalState @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       struct optionalTag *ot;
  @@ -417,8 +389,6 @@
   /**
    */
   static int doIcon(Spec spec, Header h)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies h, rpmGlobalMacroContext, fileSystem, internalState  @*/
   {
       static size_t iconsize = 0;
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
  @@ -474,7 +444,7 @@
       case URL_IS_MONGO:       /* XXX FIXME */
        rpmlog(RPMLOG_ERR, _("Invalid icon URL: %s\n"), Lurlfn);
        goto exit;
  -     /*@notreached@*/ break;
  +     break;
       }
   
       fd = Fopen(fn, "r%{?_rpmgio}");
  @@ -550,9 +520,7 @@
            he->p.ptr = _free(he->p.ptr);
        }
       }
  -    /*@-usereleased -compdef@*/
       return t;
  -    /*@=usereleased =compdef@*/
   }
   
   #define SINGLE_TOKEN_ONLY \
  @@ -563,13 +531,10 @@
   }
   
   #if defined(SUPPORT_I18NSTRING_TYPE)
  -/*@-redecl@*/
   extern int noLang;
  -/*@=redecl@*/
   #endif
   
   static rpmRC tagValidate(Spec spec, rpmTag tag, const char * value)
  -     /*@*/
   {
       const char * tagN = tagName(tag);
       const char * pattern = rpmExpand("%{?pattern_", tagN, "}", NULL);
  @@ -605,13 +570,6 @@
    */
   static rpmRC handlePreambleTag(Spec spec, Package pkg, rpmTag tag,
                const char *macro, const char *lang)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies spec->macros, spec->st,
  -             spec->sources, spec->numSources, spec->noSource,
  -             spec->sourceHeader, spec->BANames, spec->BACount,
  -             spec->line,
  -             pkg->header, pkg->autoProv, pkg->autoReq, pkg->noarch,
  -             rpmGlobalMacroContext, fileSystem, internalState @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       char * field = spec->line;
  @@ -926,10 +884,8 @@
        break;
       }
   
  -/*@-usereleased@*/
       if (macro)
        addMacro(spec->macros, macro, NULL, field, RMIL_SPEC);
  -/*@=usereleased@*/
       
       return RPMRC_OK;
   }
  @@ -943,11 +899,9 @@
       rpmTag tag;
       int multiLang;
       int obsolete;
  -/*@observer@*/ /*@null@*/
       const char * token;
   } * PreambleRec;
   
  -/*@unchecked@*/
   static struct PreambleRec_s preambleList[] = {
       {RPMTAG_NAME,            0, 0, "name"},
       {RPMTAG_VERSION,         0, 0, "version"},
  @@ -1011,16 +965,13 @@
   #if defined(RPM_VENDOR_OPENPKG) /* make-class-available-as-macro */
       {RPMTAG_CLASS,           0, 0, "class"},
   #endif
  -    /*@-nullassign@*/        /* LCL: can't add null annotation */
       {0, 0, 0, 0}
  -    /*@=nullassign@*/
   };
   
   /**
    */
  -static int findPreambleTag(Spec spec, /*@out@*/rpmTag * tagp,
  -             /*@null@*/ /*@out@*/ const char ** macro, /*@out@*/ char * lang)
  -     /*@modifies *tagp, *macro, *lang @*/
  +static int findPreambleTag(Spec spec, rpmTag * tagp,
  +             const char ** macro, char * lang)
   {
       PreambleRec p;
       char *s;
  @@ -1047,9 +998,7 @@
        int aTagsSize = 0;
        int rc = 1;     /* assume failure */
   
  -/*@-noeffect@*/
        (void) tagName(0); /* XXX force arbitrary tags to be initialized. */
  -/*@=noeffect@*/
        aTags = rpmTags->aTags;
        aTagsSize = argvCount(aTags);   /* XXX FIXME: rpmTags->aTagsSize; */
        if (aTags != NULL && aTags[0] != NULL) {
  @@ -1103,9 +1052,7 @@
       if (tagp)
        *tagp = p->tag;
       if (macro)
  -     /*@-onlytrans -observertrans -dependenttrans@*/ /* FIX: double 
indirection. */
        *macro = p->token;
  -     /*@=onlytrans =observertrans =dependenttrans@*/
       return 0;
   }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parsePrep.c
  ============================================================================
  $ cvs diff -u -r2.132.2.11 -r2.132.2.12 parsePrep.c
  --- rpm/build/parsePrep.c     10 May 2016 17:02:16 -0000      2.132.2.11
  +++ rpm/build/parsePrep.c     16 May 2017 20:14:31 -0000      2.132.2.12
  @@ -20,13 +20,9 @@
   #include "debug.h"
   
   /* These have to be global to make up for stupid compilers */
  -/*@unchecked@*/
       static int leaveDirs, skipDefaultAction;
  -/*@unchecked@*/
       static int createDir, quietly;
  -/*@unchecked@*/ /*@observer@*/ /*@null@*/
       static const char * dirName = NULL;
  -/*@unchecked@*/ /*@observer@*/
       static struct poptOption optionsTable[] = {
            { NULL, 'a', POPT_ARG_STRING, NULL, 'a',    NULL, NULL},
            { NULL, 'b', POPT_ARG_STRING, NULL, 'b',    NULL, NULL},
  @@ -44,8 +40,6 @@
    * @return           RPMRC_OK on success
    */
   static rpmRC checkOwners(const char * urlfn)
  -     /*@globals h_errno, fileSystem, internalState @*/
  -     /*@modifies fileSystem, internalState @*/
   {
       struct stat sb;
   
  @@ -75,11 +69,8 @@
    * @param subdir     sub-directory (i.e patch -d argument);
    * @return           expanded %patch macro (NULL on error)
    */
  -/*@observer@*/
   static char *doPatch(Spec spec, rpmuint32_t c, int strip, const char *db,
                     int reverse, int removeEmpties, int fuzz, const char 
*subdir)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
   {
       const char *fn, *Lurlfn;
       static char buf[BUFSIZ];
  @@ -140,7 +131,7 @@
       case URL_IS_DASH:
        Lurlfn = _free(Lurlfn);
        return NULL;
  -     /*@notreached@*/ break;
  +     break;
       }
   
       patch = rpmGetPath("%{?__patch}", NULL);
  @@ -184,9 +175,7 @@
                "  exit $STATUS\n"
                "fi",
                c,
  -/*@-moduncon@*/
                (const char *) basename((char *)fn),
  -/*@=moduncon@*/
                zipper,
                fn, patch, strip, args, flags);
        zipper = _free(zipper);
  @@ -194,9 +183,7 @@
        sprintf(buf,
                "echo \"Patch #%u (%s):\"\n"
                "%s -p%d %s %s < '%s'", c,
  -/*@-moduncon@*/
                (const char *) basename((char *)fn),
  -/*@=moduncon@*/
                patch, strip, args, flags, fn);
       }
   
  @@ -214,10 +201,7 @@
    * @param quietly    should -vv be omitted from tar?
    * @return           expanded %setup macro (NULL on error)
    */
  -/*@observer@*/
   static const char *doUntar(Spec spec, rpmuint32_t c, int quietly)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
   {
       const char *fn, *Lurlfn;
       static char buf[BUFSIZ];
  @@ -244,14 +228,12 @@
        rubygem = 1;
   
       t = stpcpy(taropts, "-x");
  -    /*@-internalglobs@*/ /* FIX: shrug */
       if(rpmIsVerbose() && !quietly)
        t = stpcpy(t, "vv");
       if(rubygem)
        t = stpcpy(t, "m");
   
       t = stpcpy(t, "f");
  -    /*@=internalglobs@*/
   
   #if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
       Lurlfn = rpmGenPath(NULL, getSourceDir(sp->flags, sp->source), 
sp->source);
  @@ -279,7 +261,7 @@
       case URL_IS_DASH:
        Lurlfn = _free(Lurlfn);
        return NULL;
  -     /*@notreached@*/ break;
  +     break;
       }
   #ifdef       NOTYET
       {        rpmmg mg;
  @@ -402,10 +384,6 @@
    * @return           0 on success
    */
   static int doSetupMacro(Spec spec, const char * line)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies spec->buildSubdir, spec->macros, spec->prep,
  -             spec->packages->header,
  -             rpmGlobalMacroContext, fileSystem, internalState @*/
   {
       char buf[BUFSIZ];
       rpmiob before = NULL;
  @@ -419,11 +397,9 @@
       rpmuint32_t num;
       rpmRC ec = RPMRC_FAIL;   /* XXX assume failure */
   
  -    /*@-mods@*/
       leaveDirs = skipDefaultAction = 0;
       createDir = quietly = 0;
       dirName = NULL;
  -    /*@=mods@*/
   
       if ((rc = poptParseArgvString(line, &argc, &argv))) {
        rpmlog(RPMLOG_ERR, _("Error parsing %%setup: %s\n"),
  @@ -551,7 +527,7 @@
   
       /* XXX FIXME: owner & group fixes were conditioned on !geteuid() */
       /* Fix the owner, group, and permissions of the setup build tree */
  -    {        /*@observer@*/ static const char *fixmacs[] =
  +    {        static const char *fixmacs[] =
                { "%{_fixowner}", "%{_fixgroup}", "%{_fixperms}", NULL };
        const char ** fm;
   
  @@ -579,10 +555,6 @@
    * @return           RPMRC_OK on success
    */
   static rpmRC doPatchMacro(Spec spec, const char * line)
  -     /*@globals rpmGlobalMacroContext, h_errno,
  -             fileSystem, internalState @*/
  -     /*@modifies spec->prep, rpmGlobalMacroContext,
  -             fileSystem, internalState  @*/
   {
       char *s;
       char *opt_b;
  @@ -607,7 +579,6 @@
        buf[sizeof(buf)-1] = '\0';
       }
   
  -    /*@-internalglobs@*/     /* FIX: strtok has state */
       for (bp = buf; (s = strtok(bp, " \t\n")) != NULL;) {
        if (bp) {       /* remove 1st token (%patch) */
            bp = NULL;
  @@ -692,7 +663,6 @@
            patch_index++;
        }
       }
  -    /*@=internalglobs@*/
   
       /* All args processed */
   
  @@ -714,10 +684,7 @@
   }
   #endif
   
  -static void prepFetchVerbose(/*@unused@*/ struct Source *sp,
  -             /*@unused@*/ struct stat *st)
  -     /*@globals internalState @*/
  -     /*@modifies internalState @*/
  +static void prepFetchVerbose(struct Source *sp, struct stat *st)
   {
       char *buf;
       size_t buf_len;
  @@ -747,8 +714,6 @@
    * Check that all sources/patches/icons exist locally, fetching if necessary.
    */
   static int prepFetch(Spec spec)
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
   {
   #if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
       const char *Smacro;
  @@ -828,14 +793,10 @@
        Lurlfn = rpmGenPath(NULL, Lmacro, sp->source);
        rc = Lstat(Lurlfn, &st);
        if (rc == 0) {
  -/*@-noeffect@*/
               prepFetchVerbose(sp, &st);
  -/*@=noeffect@*/
            goto bottom;
           }
  -/*@-noeffect@*/
           prepFetchVerbose(sp, NULL);
  -/*@=noeffect@*/
        if (errno != ENOENT) {
            ec++;
            rpmlog(RPMLOG_ERR, _("Missing %s%d %s: %s\n"),
  @@ -935,7 +896,6 @@
   
       xx = argvSplit(&saveLines, rpmiobStr(iob), "\n");
   
  -/*@-usereleased@*/
       for (lines = saveLines; *lines; lines++) {
        res = 0;
        for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++)
  @@ -955,7 +915,6 @@
            return res;
        }
       }
  -/*@=usereleased@*/
   
       saveLines = argvFree(saveLines);
       iob = rpmiobFree(iob);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseReqs.c
  ============================================================================
  $ cvs diff -u -r2.57.4.1 -r2.57.4.2 parseReqs.c
  --- rpm/build/parseReqs.c     9 Sep 2014 17:12:04 -0000       2.57.4.1
  +++ rpm/build/parseReqs.c     16 May 2017 20:14:31 -0000      2.57.4.2
  @@ -12,8 +12,6 @@
   #include "rpmbuild.h"
   #include "debug.h"
   
  -/*@access EVR_t @*/
  -
   #define      SKIPWHITE(_x)   {while(*(_x) && (xisspace(*_x) || *(_x) == 
',')) (_x)++;}
   #define      SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == 
',')) (_x)++;}
   
  @@ -129,9 +127,7 @@
   
        /* Check for possible logical operator */
        if (ve > v) {
  -/*@-mods@*/
            rpmsenseFlags F = rpmEVRflags(v, &ve);
  -/*@=mods@*/
            if (F && r[0] == '/') {
                rpmlog(RPMLOG_ERR,
                         _("line %d: Versioned file name not permitted: %s\n"),
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseScript.c
  ============================================================================
  $ cvs diff -u -r2.80.2.6 -r2.80.2.7 parseScript.c
  --- rpm/build/parseScript.c   24 Jun 2016 19:04:19 -0000      2.80.2.6
  +++ rpm/build/parseScript.c   16 May 2017 20:14:31 -0000      2.80.2.7
  @@ -20,13 +20,10 @@
   #define      WITH_MOZJS      1
   #endif
   
  -/*@access poptContext @*/    /* compared with NULL */
  -
   /**
    */
   static rpmuint32_t addTriggerIndex(Package pkg, const char *file,
        const char *script, const char *prog)
  -     /*@modifies pkg->triggerFiles @*/
   {
       struct TriggerFileEntry *tfe;
       struct TriggerFileEntry *list = pkg->triggerFiles;
  @@ -58,13 +55,9 @@
   }
   
   /* these have to be global because of stupid compilers */
  -/*@unchecked@*/
  -    /*@observer@*/ /*@null@*/ static const char *name = NULL;
  -/*@unchecked@*/
  -    /*@observer@*/ /*@null@*/ static const char *prog = NULL;
  -/*@unchecked@*/
  -    /*@observer@*/ /*@null@*/ static const char *file = NULL;
  -/*@unchecked@*/
  +    static const char *name = NULL;
  +    static const char *prog = NULL;
  +    static const char *file = NULL;
       static struct poptOption optionsTable[] = {
        { NULL, 'p', POPT_ARG_STRING, &prog, 'p',       NULL, NULL},
        { NULL, 'n', POPT_ARG_STRING, &name, 'n',       NULL, NULL},
  @@ -110,11 +103,9 @@
       rpmRC rc;
       
       reqargs[0] = '\0';
  -    /*@-mods@*/
       name = NULL;
       prog = "/bin/sh";
       file = NULL;
  -    /*@=mods@*/
       
       switch (parsePart) {
         case PART_PRE:
  @@ -240,10 +231,10 @@
                rc = RPMRC_FAIL;
                goto exit;
            }
  -         /*@switchbreak@*/ break;
  +         break;
        case 'n':
            flag = PART_NAME;
  -         /*@switchbreak@*/ break;
  +         break;
        }
       }
       
  @@ -257,10 +248,8 @@
       }
   
       if (poptPeekArg(optCon)) {
  -     /*@-mods@*/
        if (name == NULL)
            name = poptGetArg(optCon);
  -     /*@=mods@*/
        if (poptPeekArg(optCon)) {
            rpmlog(RPMLOG_ERR, _("line %d: Too many names: %s\n"),
                     spec->lineNum,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseSpec.c
  ============================================================================
  $ cvs diff -u -r2.143.4.7 -r2.143.4.8 parseSpec.c
  --- rpm/build/parseSpec.c     24 Sep 2014 16:20:23 -0000      2.143.4.7
  +++ rpm/build/parseSpec.c     16 May 2017 20:14:31 -0000      2.143.4.8
  @@ -15,16 +15,11 @@
   #include "rpmts.h"
   #include "debug.h"
   
  -/*@access headerTagIndices @*/
  -/*@access FD_t @*/   /* compared with NULL */
  -
   /**
    */
  -/*@unchecked@*/
   static struct PartRec {
       rpmParseState part;
       size_t len;
  -/*@observer@*/ /*@null@*/
       const char * token;
   } partList[] = {
       { PART_PREAMBLE,      0, "%package"},
  @@ -55,7 +50,6 @@
   /**
    */
   static inline void initParts(struct PartRec *p)
  -     /*@modifies p->len @*/
   {
       for (; p->token != NULL; p++)
        p->len = strlen(p->token);
  @@ -86,9 +80,7 @@
        ARGV_t aTags = NULL;
        int aTagsSize = 0;
        const char * s;
  -/*@-noeffect@*/
           (void) tagName(0); /* XXX force arbitrary tags to be initialized. */
  -/*@=noeffect@*/
           aTags = rpmTags->aTags;
        aTagsSize = argvCount(aTags);   /* XXX FIXME: rpmTags->aTagsSize; */
           if (aTags != NULL && aTags[0] != NULL) {
  @@ -119,7 +111,6 @@
    */
   RPM_GNUC_PURE
   static int matchTok(const char *token, const char *line)
  -     /*@*/
   {
       const char *b, *be = line;
       size_t toklen = strlen(token);
  @@ -150,7 +141,6 @@
   /**
    */
   static void forceIncludeFile(Spec spec, const char * fileName)
  -     /*@modifies spec->fileStack @*/
   {
       OFI_t * ofi;
   
  @@ -163,7 +153,6 @@
   /**
    */
   static int restoreFirstChar(Spec spec)
  -     /*@modifies spec->nextline, spec->nextpeekc @*/
   {
       /* Restore 1st char in (possible) next line */
       if (spec->nextline != NULL && spec->nextpeekc != '\0') {
  @@ -177,11 +166,6 @@
   /**
    */
   static int copyNextLineFromOFI(Spec spec, OFI_t * ofi, rpmStripFlags strip)
  -     /*@globals rpmGlobalMacroContext, h_errno,
  -             fileSystem, internalState @*/
  -     /*@modifies spec->nextline, spec->lbuf, spec->lbufPtr,
  -             ofi->readPtr,
  -             rpmGlobalMacroContext, fileSystem, internalState @*/
   {
       char ch;
   
  @@ -194,9 +178,7 @@
        ch = ' ';
        while (from && *from && ch != '\n')
            ch = *to++ = *from++;
  -/*@-mods@*/
        spec->lbufPtr = to;
  -/*@=mods@*/
        *to++ = '\0';
        ofi->readPtr = from;
   
  @@ -205,37 +187,33 @@
            switch (*p) {
                case '\\':
                    switch (*(p+1)) {
  -                     case '\n': p++, nc = 1; /*@innerbreak@*/ break;
  -                     case '\0': /*@innerbreak@*/ break;
  -                     default: p++; /*@innerbreak@*/ break;
  +                     case '\n': p++, nc = 1; break;
  +                     case '\0':              break;
  +                     default:   p++;         break;
                    }
  -                 /*@switchbreak@*/ break;
  -             case '\n': nc = 0; /*@switchbreak@*/ break;
  +                 break;
  +             case '\n': nc = 0; break;
                case '%':
                    switch (*(p+1)) {
  -                     case '{': p++, bc++; /*@innerbreak@*/ break;
  -                     case '(': p++, pc++; /*@innerbreak@*/ break;
  -                     case '%': p++; /*@innerbreak@*/ break;
  +                     case '{': p++, bc++; break;
  +                     case '(': p++, pc++; break;
  +                     case '%': p++;       break;
                    }
  -                 /*@switchbreak@*/ break;
  -             case '{': if (bc > 0) bc++; /*@switchbreak@*/ break;
  -             case '}': if (bc > 0) bc--; /*@switchbreak@*/ break;
  -             case '(': if (pc > 0) pc++; /*@switchbreak@*/ break;
  -             case ')': if (pc > 0) pc--; /*@switchbreak@*/ break;
  +                 break;
  +             case '{': if (bc > 0) bc++; break;
  +             case '}': if (bc > 0) bc--; break;
  +             case '(': if (pc > 0) pc++; break;
  +             case ')': if (pc > 0) pc--; break;
            }
        }
        
        /* If it doesn't, ask for one more line. We need a better
         * error code for this. */
        if (pc || bc || nc ) {
  -/*@-observertrans -readonlytrans@*/
            spec->nextline = "";
  -/*@=observertrans =readonlytrans@*/
            return RPMRC_FAIL;
        }
  -/*@-mods@*/
        spec->lbufPtr = spec->lbuf;
  -/*@=mods@*/
   
        /* Don't expand macros (eg. %define) in false branch of %if clause */
        /* Also don't expand macros in %changelog if STRIP_NOEXPAND is set */
  @@ -256,7 +234,6 @@
   /**
    */
   static int copyNextLineFinish(Spec spec, int strip)
  -     /*@modifies spec->line, spec->nextline, spec->nextpeekc @*/
   {
       char *last;
       char ch;
  @@ -288,9 +265,6 @@
   /**
    */
   static int readLineFromOFI(Spec spec, OFI_t *ofi)
  -     /*@globals h_errno, fileSystem, internalState @*/
  -     /*@modifies ofi, spec->fileStack, spec->lineNum, spec->sl,
  -             fileSystem, internalState @*/
   {
   retry:
       /* Make sure the current file is open */
  @@ -307,9 +281,7 @@
   
       /* Make sure we have something in the read buffer */
       if (!(ofi->readPtr && *(ofi->readPtr))) {
  -     /*@-type@*/ /* FIX: cast? */
        FILE * f = fdGetFp(ofi->fd);
  -     /*@=type@*/
        if (f == NULL || !fgets(ofi->readBuf, (int)sizeof(ofi->readBuf), f)) {
            /* EOF */
            if (spec->readStack->next) {
  @@ -321,9 +293,7 @@
            spec->fileStack = ofi->next;
            (void) Fclose(ofi->fd);
            ofi->fileName = _free(ofi->fileName);
  -/*@-temptrans@*/
            ofi = _free(ofi);
  -/*@=temptrans@*/
   
            /* only on last file do we signal EOF to caller */
            ofi = spec->fileStack;
  @@ -475,9 +445,7 @@
        spec->line[0] = '\0';
       }
   
  -    /*@-compmempass@*/ /* FIX: spec->readStack->next should be dependent */
       return 0;
  -    /*@=compmempass@*/
   }
   
   void closeSpec(Spec spec)
  @@ -496,9 +464,6 @@
   /**
    */
   static inline int genSourceRpmName(Spec spec)
  -     /*@globals internalState @*/
  -     /*@modifies spec->sourceRpmName, spec->packages->header,
  -             internalState @*/
   {
       if (spec->sourceRpmName == NULL) {
        const char *N, *V, *R;
  @@ -517,10 +482,7 @@
       return 0;
   }
   
  -/*@-redecl@*/
  -/*@unchecked@*/
   extern int noLang;           /* XXX FIXME: pass as arg */
  -/*@=redecl@*/
   
   /*@todo Skip parse recursion if os is not compatible. @*/
   int parseSpec(rpmts ts, const char *specFile, const char *rootURL,
  @@ -569,34 +531,33 @@
       /* in the spec's line buffer.  Except for parsePreamble(),   */
       /* which handles the initial entry into a spec file.         */
       
  -    /*@-infloops@*/  /* LCL: parsePart is modified @*/
       while (parsePart > PART_NONE) {
        int goterror = 0;
   
        switch (parsePart) {
        default:
            goterror = 1;
  -         /*@switchbreak@*/ break;
  +         break;
        case PART_PREAMBLE:
            parsePart = parsePreamble(spec, initialPackage);
            initialPackage = 0;
  -         /*@switchbreak@*/ break;
  +         break;
        case PART_PREP:
            parsePart = parsePrep(spec, verify);
  -         /*@switchbreak@*/ break;
  +         break;
        case PART_BUILD:
        case PART_INSTALL:
        case PART_CHECK:
        case PART_CLEAN:
        case PART_ARBITRARY:
            parsePart = parseBuildInstallClean(spec, parsePart);
  -         /*@switchbreak@*/ break;
  +         break;
        case PART_CHANGELOG:
            parsePart = parseChangelog(spec);
  -         /*@switchbreak@*/ break;
  +         break;
        case PART_DESCRIPTION:
            parsePart = parseDescription(spec);
  -         /*@switchbreak@*/ break;
  +         break;
   
        case PART_PRE:
        case PART_POST:
  @@ -611,16 +572,16 @@
        case PART_TRIGGERUN:
        case PART_TRIGGERPOSTUN:
            parsePart = parseScript(spec, parsePart);
  -         /*@switchbreak@*/ break;
  +         break;
   
        case PART_FILES:
            parsePart = parseFiles(spec);
  -         /*@switchbreak@*/ break;
  +         break;
   
        case PART_NONE:         /* XXX avoid gcc whining */
        case PART_LAST:
        case PART_BUILDARCHITECTURES:
  -         /*@switchbreak@*/ break;
  +         break;
        }
   
        if (goterror || parsePart >= PART_LAST) {
  @@ -655,10 +616,8 @@
                 || (spec->BASpecs[index] = rpmtsSetSpec(ts, NULL)) == NULL)
                {
                        spec->BACount = index;
  -/*@-nullstate@*/
                        spec = freeSpec(spec);
                        return RPMRC_FAIL;
  -/*@=nullstate@*/
                }
   
                /* XXX there's more to do than delete the macro. */
  @@ -670,10 +629,8 @@
            if (! index) {
                rpmlog(RPMLOG_ERR,
                        _("No compatible architectures found for build\n"));
  -/*@-nullstate@*/
                spec = freeSpec(spec);
                return RPMRC_FAIL;
  -/*@=nullstate@*/
            }
   
            /*
  @@ -696,7 +653,6 @@
            return 0;
        }
       }
  -    /*@=infloops@*/  /* LCL: parsePart is modified @*/
   
       /* Initialize source RPM name. */
       (void) genSourceRpmName(spec);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/poptBT.c
  ============================================================================
  $ cvs diff -u -r2.31.4.1 -r2.31.4.2 poptBT.c
  --- rpm/build/poptBT.c        21 Mar 2016 22:08:52 -0000      2.31.4.1
  +++ rpm/build/poptBT.c        16 May 2017 20:14:31 -0000      2.31.4.2
  @@ -20,12 +20,9 @@
   
   #include "debug.h"
   
  -/*@unchecked@*/
   extern int _pkg_debug;
  -/*@unchecked@*/
   extern int _spec_debug;
   
  -/*@unchecked@*/
   struct rpmBuildArguments_s         rpmBTArgs;
   
   #if defined(SUPPORT_I18NSTRING_TYPE)
  @@ -51,23 +48,19 @@
   #define      POPT_TP                 0x7470
   #define      POPT_TS                 0x7473
   
  -/*@unchecked@*/
   int _rpmbuildFlags = 3;
   
   #if defined(SUPPORT_I18NSTRING_TYPE)
  -/*@-exportlocal@*/
  -/*@unchecked@*/
   int noLang = 0;
  -/*@=exportlocal@*/
   #endif
   
   /**
    */
  -static void buildArgCallback( /*@unused@*/ poptContext con,
  -             /*@unused@*/ enum poptCallbackReason reason,
  +static void buildArgCallback(poptContext con,
  +             enum poptCallbackReason reason,
                const struct poptOption * opt,
  -             /*@unused@*/ const char * arg,
  -             /*@unused@*/ const void * data)
  +             const char * arg,
  +             const void * data)
   {
       BTA_t rba = &rpmBTArgs;
   
  @@ -120,13 +113,9 @@
   
   /**
    */
  -/*@-bitwisesigned -compmempass @*/
  -/*@unchecked@*/
   struct poptOption rpmBuildPoptTable[] = {
  -/*@-type@*/ /* FIX: cast? */
    { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | 
POPT_CBFLAG_CONTINUE,
        buildArgCallback, 0, NULL, NULL },
  -/*@=type@*/
   
    { "bp", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BP,
        N_("build through %prep (unpack sources and apply patches) from 
<specfile>"),
  @@ -229,4 +218,3 @@
   
      POPT_TABLEEND
   };
  -/*@=bitwisesigned =compmempass @*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/reqprov.c
  ============================================================================
  $ cvs diff -u -r1.91.2.6 -r1.91.2.7 reqprov.c
  --- rpm/build/reqprov.c       15 Apr 2012 15:04:14 -0000      1.91.2.6
  +++ rpm/build/reqprov.c       16 May 2017 20:14:31 -0000      1.91.2.7
  @@ -11,8 +11,8 @@
   #include "rpmbuild.h"
   #include "debug.h"
   
  -int addReqProv(/*@unused@*/ Spec spec, Header h,
  -             /*@unused@*/ rpmTag tagN,
  +int addReqProv(Spec spec, Header h,
  +             rpmTag tagN,
                const char * N, const char * EVR, rpmsenseFlags Flags,
                rpmuint32_t index)
   {
  @@ -157,12 +157,10 @@
   
            break;
        }
  -/*@-usereleased@*/
        names = _free(names);
        versions = _free(versions);
        flags = _free(flags);
        indexes = _free(indexes);
  -/*@=usereleased@*/
        if (duplicate)
            return 0;
       }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/spec.c
  ============================================================================
  $ cvs diff -u -r2.211.2.4 -r2.211.2.5 spec.c
  --- rpm/build/spec.c  24 Sep 2014 16:20:23 -0000      2.211.2.4
  +++ rpm/build/spec.c  16 May 2017 20:14:31 -0000      2.211.2.5
  @@ -19,28 +19,21 @@
   
   #include "debug.h"
   
  -/*@unchecked@*/
   int _pkg_debug;
   
  -/*@unchecked@*/
   int _spec_debug;
   
  -/*@-redecl@*/
   extern int specedit;
  -/*@=redecl@*/
   
   #define SKIPWHITE(_x)        {while(*(_x) && (xisspace(*_x) || *(_x) == 
',')) (_x)++;}
   #define SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) 
(_x)++;}
   
  -/*@access rpmluav @*/
  -
   /**
    * @param p          trigger entry chain
    * @return           NULL always
    */
   static inline
  -/*@null@*/ struct TriggerFileEntry * freeTriggerFiles(/*@only@*/ /*@null@*/ 
struct TriggerFileEntry * p)
  -     /*@modifies p @*/
  +struct TriggerFileEntry * freeTriggerFiles(struct TriggerFileEntry * p)
   {
       struct TriggerFileEntry *o, *q = p;
       
  @@ -61,8 +54,7 @@
    * @return           NULL always
    */
   static inline
  -/*@null@*/ struct Source * freeSources(/*@only@*/ /*@null@*/ struct Source * 
s)
  -     /*@modifies s @*/
  +struct Source * freeSources(struct Source * s)
   {
       struct Source *r, *t = s;
   
  @@ -75,7 +67,7 @@
       return NULL;
   }
   
  -rpmRC lookupPackage(Spec spec, const char *name, int flag, /*@out@*/Package 
*pkgp)
  +rpmRC lookupPackage(Spec spec, const char *name, int flag, Package *pkgp)
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       char *NV = NULL;
  @@ -138,11 +130,9 @@
            || ((n && !strcmp(N, n)) && (V == NULL || (v && !strcmp(V, v)))))
                lastp = p;
        }
  -/*@-usereleased@*/
        n = _free(n);
        v = _free(v);
        nv = _free(nv);
  -/*@=usereleased@*/
       }
       rc = (lastp == NULL ? RPMRC_FAIL : RPMRC_OK);
       NV = _free(NV);
  @@ -150,12 +140,11 @@
   
   exit:
       if (pkgp)
  -     /*@-dependenttrans@*/ *pkgp = lastp; /*@=dependenttrans@*/
  +     *pkgp = lastp;
       return rc;
   }
   
   static void pkgFini(void * _pkg)
  -     /*@modifies _pkg @*/
   {
       Package pkg = _pkg;
   
  @@ -184,7 +173,6 @@
       pkg->triggerFiles = freeTriggerFiles(pkg->triggerFiles);
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
   rpmioPool _pkgPool;
   
   static Package pkgGetPool(rpmioPool pool)
  @@ -201,7 +189,7 @@
       return pkg;
   }
   
  -Package newPackage(/*@unused@*/ Spec spec)
  +Package newPackage(Spec spec)
   {
       Package pkg = pkgGetPool(_pkgPool);
   
  @@ -253,8 +241,7 @@
   /**
    */
   RPM_GNUC_PURE
  -static inline /*@owned@*/ struct Source *findSource(Spec spec, rpmuint32_t 
num, int flag)
  -     /*@*/
  +static inline struct Source *findSource(Spec spec, rpmuint32_t num, int flag)
   {
       struct Source *p;
   
  @@ -282,9 +269,7 @@
       for (i = 0; i < num; i++)
        if ((p = p->next) == NULL) return NULL;
   
  -/*@-usereleased@*/
       return p;
  -/*@=usereleased@*/
   }
   
   /**
  @@ -359,8 +344,7 @@
       return RPMRC_OK;
   }
   
  -int addSource(Spec spec, /*@unused@*/ Package pkg,
  -             const char *field, rpmTag tag)
  +int addSource(Spec spec, Package pkg, const char *field, rpmTag tag)
   {
       struct Source *p;
   #if defined(RPM_VENDOR_OPENPKG) /* regular-ordered-sources */
  @@ -392,7 +376,7 @@
        break;
       default:
   assert(0);
  -     /*@notreached@*/ break;
  +     break;
       }
   #if !defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
       mdir = getSourceDir(flag);
  @@ -472,9 +456,7 @@
            rpmluavSetListMode(var, 1);
            rpmluavSetValue(var, RPMLUAV_STRING, body);
            rpmluaSetVar(lua, var);
  -/*@-moduncon@*/
            var = (rpmluav) rpmluavFree(var);
  -/*@=moduncon@*/
            rpmluaPop(lua);
        }
   #endif
  @@ -486,8 +468,7 @@
   
   /**
    */
  -static inline /*@only@*/ /*@null@*/ speclines newSl(void)
  -     /*@*/
  +static inline speclines newSl(void)
   {
       speclines sl = NULL;
       if (specedit) {
  @@ -501,23 +482,19 @@
   
   /**
    */
  -static inline /*@null@*/ speclines freeSl(/*@only@*/ /*@null@*/ speclines sl)
  -     /*@modifies sl @*/
  +static inline speclines freeSl(speclines sl)
   {
       int i;
       if (sl == NULL) return NULL;
       for (i = 0; i < sl->sl_nlines; i++)
  -     /*@-unqualifiedtrans@*/
        sl->sl_lines[i] = _free(sl->sl_lines[i]);
  -     /*@=unqualifiedtrans@*/
       sl->sl_lines = _free(sl->sl_lines);
       return _free(sl);
   }
   
   /**
    */
  -static inline /*@only@*/ /*@null@*/ spectags newSt(void)
  -     /*@*/
  +static inline spectags newSt(void)
   {
       spectags st = NULL;
       if (specedit) {
  @@ -531,8 +508,7 @@
   
   /**
    */
  -static inline /*@null@*/ spectags freeSt(/*@only@*/ /*@null@*/ spectags st)
  -     /*@modifies st @*/
  +static inline spectags freeSt(spectags st)
   {
       int i;
       if (st == NULL) return NULL;
  @@ -546,7 +522,6 @@
   }
   
   static void specFini(void * _spec)
  -     /*@modifies _spec @*/
   {
       Spec spec = _spec;
       struct ReadLevelEntry *rl;
  @@ -574,9 +549,7 @@
   
       while (spec->readStack) {
        rl = spec->readStack;
  -     /*@-dependenttrans@*/
        spec->readStack = rl->next;
  -     /*@=dependenttrans@*/
        rl->next = NULL;
        rl = _free(rl);
       }
  @@ -594,14 +567,10 @@
       if (!spec->recursing) {
        if (spec->BASpecs != NULL)
        while (spec->BACount--) {
  -         /*@-unqualifiedtrans@*/
            spec->BASpecs[spec->BACount] =
                        freeSpec(spec->BASpecs[spec->BACount]);
  -         /*@=unqualifiedtrans@*/
        }
  -     /*@-compdef@*/
        spec->BASpecs = _free(spec->BASpecs);
  -     /*@=compdef@*/
       }
       spec->BANames = _free(spec->BANames);
   
  @@ -622,7 +591,6 @@
       
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
   rpmioPool _specPool;
   
   static Spec specGetPool(rpmioPool pool)
  @@ -702,14 +670,13 @@
       spec->force = 0;
       spec->anyarch = 0;
   
  -/*@i@*/      spec->macros = rpmGlobalMacroContext;
  +    spec->macros = rpmGlobalMacroContext;
   
       spec->_parseRCPOT = parseRCPOT;  /* XXX hack around backward linkage. */
       
       return (Spec)rpmioLinkPoolItem((rpmioItem)spec, __FUNCTION__, __FILE__, 
__LINE__);
   }
   
  -/*@only@*/
   struct OpenFileInfo * newOpenFileInfo(void)
   {
       struct OpenFileInfo *ofi;
  @@ -731,9 +698,6 @@
    */
   static void
   printNewSpecfile(Spec spec)
  -     /*@globals fileSystem, internalState @*/
  -     /*@modifies spec->sl->sl_lines[], spec->packages->header,
  -             fileSystem, internalState @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       Header h;
  @@ -771,7 +735,7 @@
                xx = headerGet(h, he, 0);
                if (!strcmp(he->p.str, fmt)) {
                    he->p.ptr = _free(he->p.ptr);
  -                 /*@innerbreak@*/ break;
  +                 break;
                }
                he->p.ptr = _free(he->p.ptr);
            }
  @@ -796,24 +760,20 @@
        switch(t->t_tag) {
        case RPMTAG_SUMMARY:
        case RPMTAG_GROUP:
  -         /*@-unqualifiedtrans@*/
            sl->sl_lines[t->t_startx] = _free(sl->sl_lines[t->t_startx]);
  -         /*@=unqualifiedtrans@*/
            if (t->t_lang && strcmp(t->t_lang, RPMBUILD_DEFAULT_LANG))
                continue;
            {   char *buf = xmalloc(strlen(tn) + sizeof(": ") + strlen(msgstr));
                (void) stpcpy( stpcpy( stpcpy(buf, tn), ": "), msgstr);
                sl->sl_lines[t->t_startx] = buf;
            }
  -         /*@switchbreak@*/ break;
  +         break;
        case RPMTAG_DESCRIPTION:
            for (j = 1; j < t->t_nlines; j++) {
                if (*sl->sl_lines[t->t_startx + j] == '%')
  -                 /*@innercontinue@*/ continue;
  -             /*@-unqualifiedtrans@*/
  +                 continue;
                sl->sl_lines[t->t_startx + j] =
                        _free(sl->sl_lines[t->t_startx + j]);
  -             /*@=unqualifiedtrans@*/
            }
            if (t->t_lang && strcmp(t->t_lang, RPMBUILD_DEFAULT_LANG)) {
                sl->sl_lines[t->t_startx] = _free(sl->sl_lines[t->t_startx]);
  @@ -822,7 +782,7 @@
            sl->sl_lines[t->t_startx + 1] = xstrdup(msgstr);
            if (t->t_nlines > 2)
                sl->sl_lines[t->t_startx + 2] = xstrdup("\n\n");
  -         /*@switchbreak@*/ break;
  +         break;
        }
       }
       msgstr = _free(msgstr);
  @@ -847,7 +807,6 @@
    */
   static int initSourceHeaderScriptlet(Header h,
                rpmTag progTag, rpmTag scriptTag, rpmiob iob)
  -     /*@modifies h @*/
   {
       HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
       int xx;
  @@ -877,7 +836,6 @@
    * @return           0 always
    */
   static int initSourceHeaderScriptlets(Spec spec)
  -     /*@modifies spec->sourceHeader @*/
   {
       int xx;
   
  @@ -908,10 +866,8 @@
    * @param target     cpu-vender-os platform for query (NULL is current)
    * @return              0 on success
    */
  -static int _specQuery(rpmts ts, QVA_t qva, const char *specName,
  -             /*@null@*/ const char *target) 
  -     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  -     /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
  +static
  +int _specQuery(rpmts ts, QVA_t qva, const char *specName, const char 
*target) 
   {
       Spec spec = NULL;
       Package pkg;
  @@ -923,7 +879,6 @@
       int verify = 0;
       int xx;
   
  -    /*@-mods@*/ /* FIX: make spec abstract */
       if (parseSpec(ts, specName, "/", recursing, passPhrase,
                cookie, anyarch, 1, verify)
         || (spec = rpmtsSetSpec(ts, NULL)) == NULL)
  @@ -933,7 +888,6 @@
            specName);
        goto exit;
       }
  -    /*@=mods@*/
   
       res = 0;
       if (specedit) {
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to