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:   03-Jul-2008 17:08:07
  Branch: HEAD                             Handle: 2008070315080502

  Modified files:
    rpm/lib                 depends.c fsm.c poptALL.c psm.c query.c
                            rpmchecksig.c rpmfi.c rpmfi.h rpmte.c rpmts.c
                            rpmts.h transaction.c
    rpm/rpmio               rpmkeyring.h

  Log:
    - jbj: splint fiddles.

  Summary:
    Revision    Changes     Path
    1.404       +6  -0      rpm/lib/depends.c
    2.170       +4  -0      rpm/lib/fsm.c
    2.92        +5  -4      rpm/lib/poptALL.c
    2.301       +4  -1      rpm/lib/psm.c
    2.203       +2  -0      rpm/lib/query.c
    1.218       +3  -1      rpm/lib/rpmchecksig.c
    2.124       +4  -0      rpm/lib/rpmfi.c
    2.55        +3  -1      rpm/lib/rpmfi.h
    2.84        +2  -0      rpm/lib/rpmte.c
    2.149       +8  -2      rpm/lib/rpmts.c
    2.100       +4  -2      rpm/lib/rpmts.h
    1.373       +8  -8      rpm/lib/transaction.c
    1.3         +16 -9      rpm/rpmio/rpmkeyring.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.403 -r1.404 depends.c
  --- rpm/lib/depends.c 6 Jun 2008 09:14:55 -0000       1.403
  +++ rpm/lib/depends.c 3 Jul 2008 15:08:05 -0000       1.404
  @@ -193,6 +193,8 @@
    * @return           0 on success
    */
   static int rpmtsAddUpgrades(rpmts ts, rpmte p, uint32_t hcolor, Header h)
  +     /[EMAIL PROTECTED] rpmGlobalMacroContext, fileSystem @*/
  +     /[EMAIL PROTECTED] ts, p, rpmGlobalMacroContext, fileSystem @*/
   {
       HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
       uint32_t tscolor = rpmtsColor(ts);
  @@ -290,6 +292,8 @@
    * @return           no. of references from build set
    */
   static int rpmtsEraseDebuginfo(rpmts ts, rpmte p, Header h, alKey pkgKey)
  +     /[EMAIL PROTECTED] rpmGlobalMacroContext, fileSystem @*/
  +     /[EMAIL PROTECTED] ts, p, rpmGlobalMacroContext, fileSystem @*/
   {
       HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
       const void *keyval = NULL;
  @@ -374,6 +378,8 @@
    * @return           0 on success
    */
   static int rpmtsAddObsoletes(rpmts ts, rpmte p, uint32_t hcolor)
  +     /[EMAIL PROTECTED] rpmGlobalMacroContext, fileSystem @*/
  +     /[EMAIL PROTECTED] ts, p, rpmGlobalMacroContext, fileSystem @*/
   {
       uint32_t tscolor = rpmtsColor(ts);
       alKey pkgKey = rpmteAddedKey(p);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/fsm.c
  ============================================================================
  $ cvs diff -u -r2.169 -r2.170 fsm.c
  --- rpm/lib/fsm.c     4 Apr 2008 12:23:20 -0000       2.169
  +++ rpm/lib/fsm.c     3 Jul 2008 15:08:05 -0000       2.170
  @@ -668,7 +668,9 @@
   
       fsm->goal = goal;
       if (cfd != NULL) {
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdLink annotation */
        fsm->cfd = fdLink(cfd, "persist (fsm)");
  +/[EMAIL PROTECTED]@*/
        pos = fdGetCpioPos(fsm->cfd);
        fdSetCpioPos(fsm->cfd, 0);
       }
  @@ -741,7 +743,9 @@
       fsm->iter->ts = rpmtsFree(fsm->iter->ts);
       fsm->iter = mapFreeIterator(fsm->iter);
       if (fsm->cfd != NULL) {
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdFree annotation */
        fsm->cfd = fdFree(fsm->cfd, "persist (fsm)");
  +/[EMAIL PROTECTED]@*/
        fsm->cfd = NULL;
       }
       fsm->failedFile = NULL;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.91 -r2.92 poptALL.c
  --- rpm/lib/poptALL.c 18 May 2008 02:19:03 -0000      2.91
  +++ rpm/lib/poptALL.c 3 Jul 2008 15:08:05 -0000       2.92
  @@ -218,7 +218,7 @@
               size_t val_len;
               val_len = strlen(val);
               if (val[val_len - 1] == '\n')
  -                fwrite(val, val_len, 1, stdout);
  +                val_len = fwrite(val, val_len, 1, stdout);
               else
                fprintf(stdout, "%s\n", val);
            val = _free(val);
  @@ -469,6 +469,7 @@
       poptContext optCon;
       char *path_buf, *path, *path_next;
       int rc;
  +    int xx;
       int i;
   
   #if defined(HAVE_MCHECK_H) && defined(HAVE_MTRACE)
  @@ -531,7 +532,7 @@
       path_buf = xstrdup(rpmpoptfiles);
       for (path = path_buf; path != NULL && *path != '\0'; path = path_next) {
           const char **av;
  -        int ac, i;
  +        int ac;
   
           /* locate start of next path element */
           path_next = strchr(path, ':');
  @@ -543,7 +544,7 @@
           /* glob-expand the path element */
           ac = 0;
           av = NULL;
  -        if ((i = rpmGlob(path, &ac, &av)) != 0)
  +        if ((xx = rpmGlob(path, &ac, &av)) != 0)
               continue;
   
           /* work-off each resulting file from the path element */
  @@ -553,7 +554,7 @@
                fn++;
                if (!rpmSecuritySaneFile(fn)) {
                    rpmlog(RPMLOG_WARNING, "existing POPT configuration file 
\"%s\" considered INSECURE -- not loaded\n", fn);
  -                 continue;
  +                 /[EMAIL PROTECTED]@*/ continue;
                }
            }
            (void) poptReadConfigFile(optCon, fn);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  ============================================================================
  $ cvs diff -u -r2.300 -r2.301 psm.c
  --- rpm/lib/psm.c     22 May 2008 20:49:21 -0000      2.300
  +++ rpm/lib/psm.c     3 Jul 2008 15:08:05 -0000       2.301
  @@ -249,7 +249,9 @@
   assert(fi->h != NULL);
   assert(((rpmte)fi->te)->h == NULL);  /* XXX headerFree side effect */
       (void) rpmteSetHeader(fi->te, fi->h);
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdLink annotation */
       ((rpmte)fi->te)->fd = fdLink(fd, "installSourcePackage");
  +/[EMAIL PROTECTED]@*/
   
       (void) headerMacrosLoad(fi->h);
   
  @@ -1547,7 +1549,8 @@
    * @return           0 always
    */
   static int populateInstallHeader(const rpmts ts, const rpmte te, rpmfi fi)
  -     /[EMAIL PROTECTED] fi @*/
  +     /[EMAIL PROTECTED] fileSystem @*/
  +     /[EMAIL PROTECTED] fi, fileSystem @*/
   {
       HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
       uint32_t tscolor = rpmtsColor(ts);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/query.c
  ============================================================================
  $ cvs diff -u -r2.202 -r2.203 query.c
  --- rpm/lib/query.c   20 Jun 2008 11:13:34 -0000      2.202
  +++ rpm/lib/query.c   3 Jul 2008 15:08:05 -0000       2.203
  @@ -182,7 +182,9 @@
   
       if (qva->qva_queryFormat != NULL) {
        const char * str;
  +/[EMAIL PROTECTED]@*/        /* FIX rpmtsGetRDB()? */
        (void) headerSetRpmdb(h, ts->rdb);
  +/[EMAIL PROTECTED]@*/
        str = queryHeader(h, qva->qva_queryFormat);
        (void) headerSetRpmdb(h, NULL);
        if (str) {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.217 -r1.218 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c     18 May 2008 02:03:13 -0000      1.217
  +++ rpm/lib/rpmchecksig.c     3 Jul 2008 15:08:05 -0000       1.218
  @@ -75,8 +75,10 @@
        }
        if (fnp != NULL)
            *fnp = fn;
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdLink/XfdFree annotation */
        *fdp = fdLink(fd, "manageFile return");
        fd = fdFree(fd, "manageFile return");
  +/[EMAIL PROTECTED]@*/
        return 0;
       }
   
  @@ -310,7 +312,7 @@
            for (i = 0; i < nsigs; i++) {
                he->tag = (rpmTag)sigs[i];
                xx = headerDel(sigh, he, 0);
  -             xx = rpmAddSignature(sigh, sigtarget, he->tag, qva->passPhrase);
  +             xx = rpmAddSignature(sigh, sigtarget, (rpmSigTag) he->tag, 
qva->passPhrase);
                if (xx)
                    goto exit;
            }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.123 -r2.124 rpmfi.c
  --- rpm/lib/rpmfi.c   3 Apr 2008 19:51:41 -0000       2.123
  +++ rpm/lib/rpmfi.c   3 Jul 2008 15:08:05 -0000       2.124
  @@ -1631,8 +1631,10 @@
        break;
       }
   
  +/[EMAIL PROTECTED]@*/
   if (_rpmfi_debug)
   fprintf(stderr, "*** rpmfiStat(%p, %s, %p) rc %d\n", fi, path, st, rc);
  +/[EMAIL PROTECTED]@*/
   
       return rc;
   }
  @@ -1673,8 +1675,10 @@
       fnames = argvFree(fnames);
       fmodes = _free(fmodes);
   
  +/[EMAIL PROTECTED]@*/
   if (_rpmfi_debug)
   fprintf(stderr, "*** rpmfiOpendir(%p, %s) dir %p\n", fi, name, dir);
  +/[EMAIL PROTECTED]@*/
   
       return dir;
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.h
  ============================================================================
  $ cvs diff -u -r2.54 -r2.55 rpmfi.h
  --- rpm/lib/rpmfi.h   18 Mar 2008 21:25:05 -0000      2.54
  +++ rpm/lib/rpmfi.h   3 Jul 2008 15:08:05 -0000       2.55
  @@ -673,8 +673,10 @@
    * @param name               directory path
    * @return           NULL on error
    */
  +/[EMAIL PROTECTED]@*/
   DIR * rpmfiOpendir(rpmfi fi, const char * name)
  -     /[EMAIL PROTECTED] fi @*/;
  +     /[EMAIL PROTECTED] fileSystem @*/
  +     /[EMAIL PROTECTED] fi, fileSystem @*/;
   
   /**
    * Retrieve file classes from header.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmte.c
  ============================================================================
  $ cvs diff -u -r2.83 -r2.84 rpmte.c
  --- rpm/lib/rpmte.c   22 May 2008 16:03:09 -0000      2.83
  +++ rpm/lib/rpmte.c   3 Jul 2008 15:08:05 -0000       2.84
  @@ -50,8 +50,10 @@
   
       p->fi = rpmfiFree(p->fi);
   
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdFree annotation */
       if (p->fd != NULL)
           p->fd = fdFree(p->fd, "delTE");
  +/[EMAIL PROTECTED]@*/
   
       p->os = _free(p->os);
       p->arch = _free(p->arch);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.c
  ============================================================================
  $ cvs diff -u -r2.148 -r2.149 rpmts.c
  --- rpm/lib/rpmts.c   3 Jul 2008 14:27:31 -0000       2.148
  +++ rpm/lib/rpmts.c   3 Jul 2008 15:08:05 -0000       2.149
  @@ -655,7 +655,9 @@
       ts->dsi = _free(ts->dsi);
   
       if (ts->scriptFd != NULL) {
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdFree annotation */
        ts->scriptFd = fdFree(ts->scriptFd, "rpmtsFree");
  +/[EMAIL PROTECTED]@*/
        ts->scriptFd = NULL;
       }
       ts->rootDir = _free(ts->rootDir);
  @@ -701,7 +703,9 @@
          return -1;
   
       ts->keyring = rpmKeyringFree(ts->keyring);
  +/[EMAIL PROTECTED]@*/
       ts->keyring = keyring;
  +/[EMAIL PROTECTED]@*/
       return 0;
   }
   
  @@ -849,13 +853,15 @@
   
       if (ts != NULL) {
        if (ts->scriptFd != NULL) {
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdFree annotation */
            ts->scriptFd = fdFree(ts->scriptFd, "rpmtsSetScriptFd");
  +/[EMAIL PROTECTED]@*/
            ts->scriptFd = NULL;
        }
  -/[EMAIL PROTECTED]@*/
  +/[EMAIL PROTECTED]@*/        /* FIX: XfdLink annotation */
        if (scriptFd != NULL)
            ts->scriptFd = fdLink((void *)scriptFd, "rpmtsSetScriptFd");
  -/[EMAIL PROTECTED]@*/
  +/[EMAIL PROTECTED]@*/
       }
   }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.h
  ============================================================================
  $ cvs diff -u -r2.99 -r2.100 rpmts.h
  --- rpm/lib/rpmts.h   2 Jul 2008 16:02:50 -0000       2.99
  +++ rpm/lib/rpmts.h   3 Jul 2008 15:08:05 -0000       2.100
  @@ -732,7 +732,8 @@
    * @param scriptFd   new script file handle (or NULL)
    */
   void rpmtsSetScriptFd(rpmts ts, /[EMAIL PROTECTED]@*/ FD_t scriptFd)
  -     /[EMAIL PROTECTED] ts, scriptFd @*/;
  +     /[EMAIL PROTECTED] fileSystem @*/
  +     /[EMAIL PROTECTED] ts, scriptFd, fileSystem @*/;
   
   /** \ingroup rpmts
    * Get selinuxEnabled flag, i.e. is SE linux enabled?
  @@ -829,7 +830,8 @@
    */
   /[EMAIL PROTECTED]@*/
   rpmPRCO rpmtsPRCO(rpmts ts)
  -     /[EMAIL PROTECTED]/;
  +     /[EMAIL PROTECTED] fileSystem @*/
  +     /[EMAIL PROTECTED] fileSystem @*/;
   
   /** \ingroup rpmts
    * Initialize disk space info for each and every mounted file systems.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/transaction.c
  ============================================================================
  $ cvs diff -u -r1.372 -r1.373 transaction.c
  --- rpm/lib/transaction.c     3 Jul 2008 14:27:31 -0000       1.372
  +++ rpm/lib/transaction.c     3 Jul 2008 15:08:05 -0000       1.373
  @@ -1135,6 +1135,7 @@
       int numRemoved;
       int rollbackFailures = 0;
       void * lock = NULL;
  +    void * ptr;
       int xx;
   
       /* XXX programmer error segfault avoidance. */
  @@ -1445,7 +1446,7 @@
       }
       pi = rpmtsiFree(pi);
   
  -    (void) rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_START, 6, ts->orderCount);
  +    ptr = rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_START, 6, ts->orderCount);
   
       /* ===============================================
        * Compute file disposition for each package in transaction set.
  @@ -1466,7 +1467,7 @@
            continue;   /* XXX can't happen */
        fc = rpmfiFC(fi);
   
  -     (void) rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_PROGRESS, rpmtsiOc(pi),
  +     ptr = rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_PROGRESS, rpmtsiOc(pi),
                        ts->orderCount);
   
        if (fc == 0) continue;
  @@ -1613,7 +1614,7 @@
            xx = Chdir(currDir);
       }
   
  -    (void) rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_STOP, 6, ts->orderCount);
  +    ptr = rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_STOP, 6, ts->orderCount);
   
       /* ===============================================
        * Free unused memory as soon as possible.
  @@ -1648,9 +1649,8 @@
        * Save removed files before erasing.
        */
       if (rpmtsFlags(ts) & (RPMTRANS_FLAG_DIRSTASH | RPMTRANS_FLAG_REPACKAGE)) 
{
  -     int progress;
  +     int progress = 0;
   
  -     progress = 0;
        pi = rpmtsiInit(ts);
        while ((p = rpmtsiNext(pi, 0)) != NULL) {
   
  @@ -1666,10 +1666,10 @@
                if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_REPACKAGE))
                    /[EMAIL PROTECTED]@*/ break;
                if (!progress)
  -                 (void) rpmtsNotify(ts, NULL, RPMCALLBACK_REPACKAGE_START,
  +                 ptr = rpmtsNotify(ts, NULL, RPMCALLBACK_REPACKAGE_START,
                                7, numRemoved);
   
  -             (void) rpmtsNotify(ts, NULL, RPMCALLBACK_REPACKAGE_PROGRESS,
  +             ptr = rpmtsNotify(ts, NULL, RPMCALLBACK_REPACKAGE_PROGRESS,
                                progress, numRemoved);
                progress++;
   
  @@ -1694,7 +1694,7 @@
        }
        pi = rpmtsiFree(pi);
        if (progress)
  -         (void) rpmtsNotify(ts, NULL, RPMCALLBACK_REPACKAGE_STOP,
  +         ptr = rpmtsNotify(ts, NULL, RPMCALLBACK_REPACKAGE_STOP,
                                7, numRemoved);
       }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmkeyring.h
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 rpmkeyring.h
  --- rpm/rpmio/rpmkeyring.h    2 Jul 2008 15:42:26 -0000       1.2
  +++ rpm/rpmio/rpmkeyring.h    3 Jul 2008 15:08:07 -0000       1.3
  @@ -7,23 +7,25 @@
   
   /** \ingroup rpmkeyring
    */
  -typedef struct rpmPubkey_s * rpmPubkey;
  +typedef /[EMAIL PROTECTED]@*/ struct rpmPubkey_s * rpmPubkey;
   
   /** \ingroup rpmkeyring
    */
  -typedef struct rpmKeyring_s * rpmKeyring;
  +typedef /[EMAIL PROTECTED]@*/ struct rpmKeyring_s * rpmKeyring;
   
   /** \ingroup rpmkeyring
    * Create a new, empty keyring
    * @return   new keyring handle
    */
  -rpmKeyring rpmKeyringNew(void);
  +rpmKeyring rpmKeyringNew(void)
  +     /[EMAIL PROTECTED]/;
   
   /** \ingroup rpmkeyring
    * Free keyring and the keys within it
    * @return   NULL always
    */
  -rpmKeyring rpmKeyringFree(rpmKeyring keyring);
  +rpmKeyring rpmKeyringFree(rpmKeyring keyring)
  +     /[EMAIL PROTECTED]/;
   
   /** \ingroup rpmkeyring
    * Add a public key to keyring.
  @@ -31,7 +33,8 @@
    * @param key                pubkey handle
    * @return           0 on success, -1 on error, 1 if key already present
    */
  -int rpmKeyringAddKey(rpmKeyring keyring, rpmPubkey key);
  +int rpmKeyringAddKey(rpmKeyring keyring, rpmPubkey key)
  +     /[EMAIL PROTECTED]/;
   
   /** \ingroup rpmkeyring
    * Perform keyring lookup for a key matching a signature
  @@ -39,7 +42,8 @@
    * @param sig                OpenPGP packet container of signature
    * @return           RPMRC_OK if found, RPMRC_NOKEY otherwise
    */
  -rpmRC rpmKeyringLookup(rpmKeyring keyring, pgpDig sig);
  +rpmRC rpmKeyringLookup(rpmKeyring keyring, pgpDig sig)
  +     /[EMAIL PROTECTED]/;
   
   /** \ingroup rpmkeyring
    * Create a new rpmPubkey from OpenPGP packet
  @@ -47,20 +51,23 @@
    * @param pktlen     Data length
    * @return           new pubkey handle
    */
  -rpmPubkey rpmPubkeyNew(const uint8_t *pkt, size_t pktlen);
  +rpmPubkey rpmPubkeyNew(const uint8_t *pkt, size_t pktlen)
  +     /[EMAIL PROTECTED]/;
   
   /** \ingroup rpmkeyring
    * Create a new rpmPubkey from ASCII-armored pubkey file
    * @param filename   Path to pubkey file
    * @return           new pubkey handle
    */
  -rpmPubkey rpmPubkeyRead(const char *filename);
  +rpmPubkey rpmPubkeyRead(const char *filename)
  +     /[EMAIL PROTECTED]/;
   
   /** \ingroup rpmkeyring
    * Free a pubkey.
    * @param key                Pubkey to free
    * @return           NULL always
    */
  -rpmPubkey rpmPubkeyFree(rpmPubkey key);
  +rpmPubkey rpmPubkeyFree(rpmPubkey key)
  +     /[EMAIL PROTECTED]/;
   
   #endif /* _RPMKEYDB_H */
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to