RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/lib/ depends.c rpmal.h rpmds.h rpmfc.c rpmfi.c rpmlock....

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 06 Oct 2007 - 23:33:51 CEST
Message-Id: <20071006213351.6E59534846C@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   06-Oct-2007 23:33:51
  Branch: HEAD                             Handle: 2007100622334802

  Modified files:
    rpm/lib                 depends.c rpmal.h rpmds.h rpmfc.c rpmfi.c
                            rpmlock.c rpmns.h rpmrc.c rpmsx.h rpmts.h
                            transaction.c
    rpm/rpmdb               .splintrc pkgio.c rpmdb.c signature.c
    rpm/rpmio               .splintrc getpass.c mire.c mire.h rpmdav.c rpmio.c
                            rpmlua.c rpmpgp.c rpmrpc.c rpmsq.c

  Log:
    - splint fiddles.

  Summary:
    Revision    Changes     Path
    1.342       +4  -4      rpm/lib/depends.c
    2.34        +6  -6      rpm/lib/rpmal.h
    2.58        +8  -6      rpm/lib/rpmds.h
    1.18        +6  -6      rpm/lib/rpmfc.c
    2.80        +4  -2      rpm/lib/rpmfi.c
    2.15        +4  -2      rpm/lib/rpmlock.c
    1.6         +2  -2      rpm/lib/rpmns.h
    2.212       +12 -0      rpm/lib/rpmrc.c
    2.12        +8  -4      rpm/lib/rpmsx.h
    2.79        +2  -2      rpm/lib/rpmts.h
    1.336       +2  -2      rpm/lib/transaction.c
    1.7         +3  -0      rpm/rpmdb/.splintrc
    1.11        +2  -0      rpm/rpmdb/pkgio.c
    1.164       +7  -1      rpm/rpmdb/rpmdb.c
    1.2         +3  -1      rpm/rpmdb/signature.c
    1.15        +10 -23     rpm/rpmio/.splintrc
    1.8         +3  -3      rpm/rpmio/getpass.c
    1.6         +11 -9      rpm/rpmio/mire.c
    1.6         +2  -0      rpm/rpmio/mire.h
    2.48        +28 -0      rpm/rpmio/rpmdav.c
    1.95        +1  -0      rpm/rpmio/rpmio.c
    2.22        +2  -0      rpm/rpmio/rpmlua.c
    2.61        +6  -2      rpm/rpmio/rpmpgp.c
    2.58        +2  -2      rpm/rpmio/rpmrpc.c
    1.26        +4  -0      rpm/rpmio/rpmsq.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.341 -r1.342 depends.c
  --- rpm/lib/depends.c	30 Sep 2007 20:38:25 -0000	1.341
  +++ rpm/lib/depends.c	6 Oct 2007 21:33:48 -0000	1.342
  @@ -1435,9 +1435,9 @@
    */
   static int ignoreDep(const rpmts ts, const rpmte p, const rpmte q)
   	/*@globals badDeps, badDepsInitialized,
  -		rpmGlobalMacroContext, h_errno @*/
  +		rpmGlobalMacroContext, h_errno, internalState @*/
   	/*@modifies badDeps, badDepsInitialized,
  -		rpmGlobalMacroContext @*/
  +		rpmGlobalMacroContext, internalState @*/
   {
       struct badDeps_s * bdp;
   
  @@ -1555,8 +1555,8 @@
   static /*@owned@*/ /*@null@*/ const char *
   zapRelation(rpmte q, rpmte p,
   		int zap, /*@in@*/ /*@out@*/ int * nzaps, int msglvl)
  -	/*@globals rpmGlobalMacroContext, h_errno @*/
  -	/*@modifies q, p, *nzaps, rpmGlobalMacroContext @*/
  +	/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  +	/*@modifies q, p, *nzaps, rpmGlobalMacroContext, internalState @*/
   {
       rpmds requires;
       tsortInfo tsi_prev;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmal.h
  ============================================================================
  $ cvs diff -u -r2.33 -r2.34 rpmal.h
  --- rpm/lib/rpmal.h	31 Dec 2002 01:23:03 -0000	2.33
  +++ rpm/lib/rpmal.h	6 Oct 2007 21:33:48 -0000	2.34
  @@ -101,8 +101,8 @@
   /*@only@*/ /*@null@*/
   fnpyKey * rpmalAllFileSatisfiesDepend(/*@null@*/ const rpmal al,
   		/*@null@*/ const rpmds ds, /*@null@*/ alKey * keyp)
  -	/*@globals fileSystem @*/
  -	/*@modifies al, *keyp, fileSystem @*/;
  +	/*@globals fileSystem, internalState @*/
  +	/*@modifies al, *keyp, fileSystem, internalState @*/;
   /*@=exportlocal@*/
   
   /**
  @@ -115,8 +115,8 @@
   /*@only@*/ /*@null@*/
   fnpyKey * rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds,
   		/*@null@*/ alKey * keyp)
  -	/*@globals fileSystem @*/
  -	/*@modifies al, *keyp, fileSystem @*/;
  +	/*@globals fileSystem, internalState @*/
  +	/*@modifies al, *keyp, fileSystem, internalState @*/;
   
   /**
    * Check added package file lists for first package that has a provide.
  @@ -129,8 +129,8 @@
   /*@null@*/
   fnpyKey rpmalSatisfiesDepend(const rpmal al, const rpmds ds,
   		/*@null@*/ alKey * keyp)
  -	/*@globals fileSystem @*/
  -	/*@modifies al, *keyp, fileSystem @*/;
  +	/*@globals fileSystem, internalState @*/
  +	/*@modifies al, *keyp, fileSystem, internalState @*/;
   
   #ifdef __cplusplus
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.h
  ============================================================================
  $ cvs diff -u -r2.57 -r2.58 rpmds.h
  --- rpm/lib/rpmds.h	19 Jun 2007 03:30:12 -0000	2.57
  +++ rpm/lib/rpmds.h	6 Oct 2007 21:33:48 -0000	2.58
  @@ -175,8 +175,8 @@
    */
   /*@dependent@*/ /*@observer@*/ /*@null@*/
   const char * rpmdsNewN(rpmds ds)
  -	/*@globals rpmGlobalMacroContext, h_errno @*/
  -	/*@modifies ds, rpmGlobalMacroContext @*/;
  +	/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  +	/*@modifies ds, rpmGlobalMacroContext, internalState @*/;
   
   /**
    * Return new formatted dependency string.
  @@ -185,8 +185,8 @@
    * @return		new formatted dependency (malloc'ed)
    */
   char * rpmdsNewDNEVR(const char * dspfx, rpmds ds)
  -	/*@globals rpmGlobalMacroContext, h_errno @*/
  -	/*@modifies ds, rpmGlobalMacroContext @*/;
  +	/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  +	/*@modifies ds, rpmGlobalMacroContext, internalState @*/;
   
   /**
    * Create, load and initialize a dependency for this header. 
  @@ -252,7 +252,8 @@
    */
   /*@observer@*/ /*@null@*/
   extern const char * rpmdsN(/*@null@*/ rpmds ds)
  -	/*@*/;
  +	/*@globals internalState @*/
  +	/*@modifies internalState @*/;
   
   /**
    * Return current dependency epoch-version-release.
  @@ -642,7 +643,8 @@
   void rpmdsProblem(/*@null@*/ rpmps ps, const char * pkgNEVR, const rpmds ds,
   		/*@only@*/ /*@null@*/ const fnpyKey * suggestedKeys,
   		int adding)
  -	/*@modifies ps @*/;
  +	/*@globals internalState @*/
  +	/*@modifies ps, internalState @*/;
   
   /**
    * Compare package provides dependencies from header with a single dependency.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfc.c
  ============================================================================
  $ cvs diff -u -r1.17 -r1.18 rpmfc.c
  --- rpm/lib/rpmfc.c	30 Sep 2007 20:38:25 -0000	1.17
  +++ rpm/lib/rpmfc.c	6 Oct 2007 21:33:48 -0000	1.18
  @@ -25,8 +25,8 @@
   /**
    */
   static int rpmfcExpandAppend(/*@out@*/ ARGV_t * argvp, const ARGV_t av)
  -	/*@globals rpmGlobalMacroContext, h_errno @*/
  -	/*@modifies *argvp, rpmGlobalMacroContext @*/
  +	/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  +	/*@modifies *argvp, rpmGlobalMacroContext, internalState @*/
   	/*@requires maxRead(argvp) >= 0 @*/
   {
       ARGV_t argv = *argvp;
  @@ -279,7 +279,8 @@
    */
   static char * rpmfcFileDep(/*@returned@*/ char * buf, int ix,
   		/*@null@*/ rpmds ds)
  -	/*@modifies buf @*/
  +	/*@globals fileSystem, internalState @*/
  +	/*@modifies buf, fileSystem, internalState @*/
   	/*@requires maxSet(buf) >= 0 @*/
   	/*@ensures maxRead(buf) == 0 @*/
   {
  @@ -788,16 +789,15 @@
    * @return		0 on success
    */
   static int rpmfcMergePR(void * context, rpmds ds)
  -	/*@modifies ds @*/
  +	/*@globals fileSystem, internalState @*/
  +	/*@modifies ds, fileSystem, internalState @*/
   {
       rpmfc fc = context;
       char buf[BUFSIZ];
       int rc = -1;
   
  -/*@-modfilesys@*/
   if (_rpmfc_debug < 0)
   fprintf(stderr, "*** rpmfcMergePR(%p, %p) %s\n", context, ds, tagName(rpmdsTagN(ds)));
  -/*@=modfilesys@*/
       switch(rpmdsTagN(ds)) {
       default:
   	break;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.79 -r2.80 rpmfi.c
  --- rpm/lib/rpmfi.c	30 Sep 2007 20:38:25 -0000	2.79
  +++ rpm/lib/rpmfi.c	6 Oct 2007 21:33:48 -0000	2.80
  @@ -679,8 +679,10 @@
   static
   Header relocateFileList(const rpmts ts, rpmfi fi,
   		Header origH, fileAction * actions)
  -	/*@globals h_errno, rpmGlobalMacroContext @*/
  -	/*@modifies ts, fi, origH, actions, rpmGlobalMacroContext @*/
  +	/*@globals rpmGlobalMacroContext, h_errno,
  +		internalState @*/
  +	/*@modifies ts, fi, origH, actions, rpmGlobalMacroContext,
  +		internalState @*/
   {
       rpmte p = rpmtsRelocateElement(ts);
       HGE_t hge = fi->hge;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmlock.c
  ============================================================================
  $ cvs diff -u -r2.14 -r2.15 rpmlock.c
  --- rpm/lib/rpmlock.c	30 Sep 2007 20:38:25 -0000	2.14
  +++ rpm/lib/rpmlock.c	6 Oct 2007 21:33:48 -0000	2.15
  @@ -27,8 +27,10 @@
   
   /*@null@*/
   static int rpmlock_new(/*@unused@*/ const char *rootdir, /*@null@*/ rpmlock *lockp)
  -    /*@globals rpmlock_path, h_errno, rpmGlobalMacroContext, fileSystem @*/
  -    /*@modifies *lockp, rpmlock_path, h_errno, rpmGlobalMacroContext, fileSystem @*/
  +	/*@globals rpmlock_path, rpmGlobalMacroContext, h_errno,
  +		fileSystem, internalState @*/
  +	/*@modifies *lockp, rpmlock_path, rpmGlobalMacroContext, h_errno,
  +		fileSystem, internalState @*/
   {
       static int oneshot = 0;
       rpmlock lock = xmalloc(sizeof(*lock));
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmns.h
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 rpmns.h
  --- rpm/lib/rpmns.h	30 Sep 2007 20:38:25 -0000	1.5
  +++ rpm/lib/rpmns.h	6 Oct 2007 21:33:48 -0000	1.6
  @@ -103,8 +103,8 @@
    * @return		0 always
    */
   int rpmnsParse(const char * str, rpmns ns)
  -	/*@globals rpmGlobalMacroContext, h_errno @*/
  -	/*@modifies ns, rpmGlobalMacroContext @*/;
  +	/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  +	/*@modifies ns, rpmGlobalMacroContext, internalState @*/;
   
   #ifdef __cplusplus
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  ============================================================================
  $ cvs diff -u -r2.211 -r2.212 rpmrc.c
  --- rpm/lib/rpmrc.c	30 Sep 2007 20:38:26 -0000	2.211
  +++ rpm/lib/rpmrc.c	6 Oct 2007 21:33:48 -0000	2.212
  @@ -20,6 +20,8 @@
   #include "misc.h"
   #include "debug.h"
   
  +/*@access miRE@*/
  +
   /*@unchecked@*/ /*@null@*/
   static const char * configTarget = NULL;
   
  @@ -384,6 +386,7 @@
    * @param nre		no of patterns in array
    * @return		NULL always 
    */
  +/*@-onlytrans@*/	/* XXX miRE array, not refcounted. */
   /*@null@*/
   static void * mireFreeAll(/*@only@*/ /*@null@*/ miRE mire, int nre)
   	/*@modifies mire@*/
  @@ -396,6 +399,7 @@
       }
       return NULL;
   }
  +/*@=onlytrans@*/
   
   /**
    * Append pattern to array.
  @@ -405,6 +409,7 @@
    * @retval *mi_rep	platform pattern array
    * @retval *mi_nrep	no. of patterns in array
    */
  +/*@-onlytrans@*/	/* XXX miRE array, not refcounted. */
   /*@null@*/
   static int mireAppend(rpmMireMode mode, int tag, const char * pattern,
   		miRE * mi_rep, int * mi_nrep)
  @@ -413,7 +418,9 @@
       miRE mire;
   
       mire = (*mi_rep);
  +/*@-refcounttrans@*/
       mire = xrealloc(mire, ((*mi_nrep) + 1) * sizeof(*mire));
  +/*@=refcounttrans@*/
       (*mi_rep) = mire;
       mire += (*mi_nrep);
       (*mi_nrep)++;
  @@ -422,12 +429,14 @@
       mire->tag = tag;
       return mireRegcomp(mire, pattern);
   }
  +/*@=onlytrans@*/
   
   /**
    * Read and configure /etc/rpm/platform patterns.
    * @param platform	path to platform patterns
    * @return		0 on success
    */
  +/*@-onlytrans@*/	/* XXX miRE array, not refcounted. */
   static int rpmPlatform(const char * platform)
   	/*@globals nplatpat, platpat,
   		rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  @@ -502,7 +511,9 @@
       }
       return rc;
   }
  +/*@=onlytrans@*/
   
  +/*@-onlytrans@*/	/* XXX miRE array, not refcounted. */
   int rpmPlatformScore(const char * platform, void * mi_re, int mi_nre)
   {
       miRE mire;
  @@ -520,6 +531,7 @@
       }
       return 0;
   }
  +/*@=onlytrans@*/
   
   /**
    */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmsx.h
  ============================================================================
  $ cvs diff -u -r2.11 -r2.12 rpmsx.h
  --- rpm/lib/rpmsx.h	1 Aug 2007 15:55:29 -0000	2.11
  +++ rpm/lib/rpmsx.h	6 Oct 2007 21:33:48 -0000	2.12
  @@ -138,8 +138,10 @@
    */
   /*@-exportlocal@*/
   int rpmsxParse(rpmsx sx, /*@null@*/ const char *fn)
  -	/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
  -	/*@modifies sx, rpmGlobalMacroContext, h_errno, fileSystem @*/;
  +	/*@globals rpmGlobalMacroContext, h_errno,
  +		fileSystem, internalState @*/
  +	/*@modifies sx, rpmGlobalMacroContext, h_errno,
  +		fileSystem, internalState @*/;
   /*@=exportlocal@*/
   
   /**
  @@ -149,8 +151,10 @@
    */
   /*@null@*/
   rpmsx rpmsxNew(const char * fn)
  -	/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
  -	/*@modifies rpmGlobalMacroContext, h_errno, fileSystem @*/;
  +	/*@globals rpmGlobalMacroContext, h_errno,
  +		fileSystem, internalState @*/
  +	/*@modifies rpmGlobalMacroContext, h_errno,
  +		fileSystem, internalState @*/;
   
   /**
    * Return security context patterns count.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.h
  ============================================================================
  $ cvs diff -u -r2.78 -r2.79 rpmts.h
  --- rpm/lib/rpmts.h	30 Sep 2007 20:38:26 -0000	2.78
  +++ rpm/lib/rpmts.h	6 Oct 2007 21:33:48 -0000	2.79
  @@ -455,8 +455,8 @@
    */
   /*@unused@*/
   int rpmtsAvailable(rpmts ts, const rpmds ds)
  -	/*@globals fileSystem @*/
  -	/*@modifies ts, fileSystem @*/;
  +	/*@globals fileSystem, internalState @*/
  +	/*@modifies ts, fileSystem, internalState @*/;
   
   /**
    * Set dependency solver callback.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/transaction.c
  ============================================================================
  $ cvs diff -u -r1.335 -r1.336 transaction.c
  --- rpm/lib/transaction.c	30 Sep 2007 20:38:26 -0000	1.335
  +++ rpm/lib/transaction.c	6 Oct 2007 21:33:48 -0000	1.336
  @@ -654,8 +654,8 @@
   /*@-mustmod@*/ /* FIX: fi->actions is modified. */
   /*@-nullpass@*/
   static void skipFiles(const rpmts ts, rpmfi fi)
  -	/*@globals rpmGlobalMacroContext, h_errno @*/
  -	/*@modifies fi, rpmGlobalMacroContext @*/
  +	/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
  +	/*@modifies fi, rpmGlobalMacroContext, internalState @*/
   {
       uint_32 tscolor = rpmtsColor(ts);
       uint_32 FColor;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/.splintrc
  ============================================================================
  $ cvs diff -u -r1.6 -r1.7 .splintrc
  --- rpm/rpmdb/.splintrc	30 Sep 2007 17:29:05 -0000	1.6
  +++ rpm/rpmdb/.splintrc	6 Oct 2007 21:33:49 -0000	1.7
  @@ -26,6 +26,9 @@
   -varuse
   
   # --- not-yet at strict level
  +-globs
  +-globuse
  +-incondefs
   -internalglobs	# 16
   -paramuse	# 6
   -mustmod	# 8
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.10 -r1.11 pkgio.c
  --- rpm/rpmdb/pkgio.c	30 Sep 2007 22:38:30 -0000	1.10
  +++ rpm/rpmdb/pkgio.c	6 Oct 2007 21:33:49 -0000	1.11
  @@ -280,7 +280,9 @@
   /*@-mods@*/ /* FIX: hide lazy malloc for now */
       if (ts->dig == NULL) {
   	ts->dig = pgpNewDig(0);
  +/*@-refcounttrans@*/
   	(void) pgpSetFindPubkey(ts->dig, (int (*)(void *, void *))rpmtsFindPubkey, ts);
  +/*@=refcounttrans@*/
       }
   /*@=mods@*/
       return ts->dig;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.c
  ============================================================================
  $ cvs diff -u -r1.163 -r1.164 rpmdb.c
  --- rpm/rpmdb/rpmdb.c	30 Sep 2007 22:38:30 -0000	1.163
  +++ rpm/rpmdb/rpmdb.c	6 Oct 2007 21:33:49 -0000	1.164
  @@ -37,9 +37,10 @@
   
   /*@access dbiIndexSet@*/
   /*@access dbiIndexItem@*/
  -/*@access rpmts@*/		/* XXX compared with NULL */
  +/*@access miRE@*/
   /*@access Header@*/		/* XXX compared with NULL */
   /*@access rpmdbMatchIterator@*/
  +/*@access rpmts@*/		/* XXX compared with NULL */
   
   /*@unchecked@*/
   int _rpmdb_debug = 0;
  @@ -1945,8 +1946,10 @@
    */
   static int mireCmp(const void * a, const void * b)
   {
  +/*@-castexpose @*/
       const miRE mireA = (const miRE) a;
       const miRE mireB = (const miRE) b;
  +/*@=castexpose @*/
       return (mireA->tag - mireB->tag);
   }
   
  @@ -2083,6 +2086,7 @@
       }
   
       nmire = mireNew(mode, tag);
  +assert(nmire != NULL);
       allpat = mireDup(nmire->tag, &nmire->mode, pattern);
   
       if (nmire->mode == RPMMIRE_DEFAULT)
  @@ -2119,6 +2123,7 @@
    * @param mi		rpm database iterator
    * @return		1 if header should be skipped
    */
  +/*@-onlytrans@*/	/* XXX miRE array, not refcounted. */
   static int mireSkip (const rpmdbMatchIterator mi)
   	/*@modifies mi->mi_re @*/
   {
  @@ -2235,6 +2240,7 @@
   
       return (ntags > 0 && ntags == nmatches ? 0 : 1);
   }
  +/*@=onlytrans@*/
   
   int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite)
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/signature.c
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 signature.c
  --- rpm/rpmdb/signature.c	30 Sep 2007 22:38:30 -0000	1.1
  +++ rpm/rpmdb/signature.c	6 Oct 2007 21:33:49 -0000	1.2
  @@ -400,13 +400,14 @@
       delMacro(NULL, "__signature_filename");
   
   #if defined(HAVE_KEYUTILS_H)
  -    if (!strcmp(passPhrase, "@u user rpm:passwd")) {
  +    if (passPhrase && !strcmp(passPhrase, "@u user rpm:passwd")) {
   	key_serial_t keyring = KEY_SPEC_PROCESS_KEYRING;
   	long key;
   	int xx;
   
   /*@-moduncon@*/
   	key = keyctl_search(keyring, "user", "rpm:passwd", 0);
  +	pw = NULL;
   	if ((xx = keyctl_read_alloc(key, (void **)&pw)) < 0) {
   	    rpmError(RPMERR_SIGGEN, _("Failed %s(%d) key(0x%lx): %s\n"),
   			"keyctl_read_alloc of key", xx, key, strerror(errno));
  @@ -774,6 +775,7 @@
   
   /*@-moduncon@*/
   	key = keyctl_search(keyring, "user", "rpm:passwd", 0);
  +	pw = NULL;
   	if ((xx = keyctl_read_alloc(key, (void **)&pw)) < 0) {
   	    rpmError(RPMERR_SIGGEN, _("Failed %s(%d) key(0x%lx): %s\n"),
   			"keyctl_read_alloc of key", xx, key, strerror(errno));
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/.splintrc
  ============================================================================
  $ cvs diff -u -r1.14 -r1.15 .splintrc
  --- rpm/rpmio/.splintrc	6 Oct 2007 19:40:23 -0000	1.14
  +++ rpm/rpmio/.splintrc	6 Oct 2007 21:33:50 -0000	1.15
  @@ -17,32 +17,19 @@
   -shiftimplementation
   -shiftnegative
   
  --compdef
  --compmempass
  --evalorderuncon
  --globs
  --globstate
  --globuse
  --moduncon
  --modunconnomods
  +-compdef		# 16
  +-compmempass		# 2
  +-globs			# 18
  +-moduncon		# 323
   -mustmod		# 17
  --noeffect
  --noeffectuncon
  --paramuse
  --protoparammatch
  -#-refcounttrans
  --sefuncon
  --sizeoftype
  -
  --dependenttrans
  --immediatetrans
  --observertrans
  --readonlytrans
  --temptrans
  +-noeffectuncon		# 183
  +-protoparammatch	# 1
  +
  +-readonlytrans		# 10
   
   -forempty
  --looploopbreak
  --nullptrarith
  +-looploopbreak		# 2 LZMA
  +-nullptrarith		# 16 LZMA
   -shadow
   
   # --- +partial artifacts
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/getpass.c
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 getpass.c
  --- rpm/rpmio/getpass.c	6 Oct 2007 19:40:23 -0000	1.7
  +++ rpm/rpmio/getpass.c	6 Oct 2007 21:33:50 -0000	1.8
  @@ -29,12 +29,12 @@
   #endif
   
   assert(pw != NULL);
  -/*@-statictrans@*/
  +/*@-observertrans -statictrans@*/
       return pw;
  -/*@=statictrans@*/
  +/*@=observertrans =statictrans@*/
   }
   
  -char * _RequestPass(const char * prompt)
  +char * _RequestPass(/*@unused@*/ const char * prompt)
   {
   /*@relnull@*/
       static char * password = NULL;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/mire.c
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 mire.c
  --- rpm/rpmio/mire.c	6 Oct 2007 19:40:23 -0000	1.5
  +++ rpm/rpmio/mire.c	6 Oct 2007 21:33:50 -0000	1.6
  @@ -70,12 +70,18 @@
   
   miRE mireFree(miRE mire)
   {
  -/*@-modfilesys@*/
  -if (_mire_debug)
  -fprintf(stderr, "--> mireFree(%p)\n", mire);
  -/*@=modfilesys@*/
  +    if (mire == NULL)
  +	return NULL;
  +
  +    if (mire->nrefs > 1)
  +	return mireUnlink(mire, "mireFree");
  +
       (void) mireClean(mire);
  +    (void) mireUnlink(mire, "mireFree");
  +/*@-refcounttrans -usereleased @*/
  +    memset(mire, 0, sizeof(*mire));
       mire = _free(mire);
  +/*@=refcounttrans =usereleased @*/
       return NULL;
   }
   
  @@ -84,11 +90,7 @@
       miRE mire = xcalloc(1, sizeof(*mire));
       mire->mode = mode;
       mire->tag = tag;
  -/*@-modfilesys@*/
  -if (_mire_debug)
  -fprintf(stderr, "--> mireNew(%d, %d) mire %p\n", mode, tag, mire);
  -/*@=modfilesys@*/
  -    return mire;
  +    return mireLink(mire,"mireNew");
   }
   
   int mireRegexec(miRE mire, const char * val)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/mire.h
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 mire.h
  --- rpm/rpmio/mire.h	6 Oct 2007 19:40:23 -0000	1.5
  +++ rpm/rpmio/mire.h	6 Oct 2007 21:33:50 -0000	1.6
  @@ -64,6 +64,7 @@
       int	eflags;		/*!< regexec(3) flags */
       int notmatch;		/*!< non-zero: negative match, like "grep -v" */
       int tag;			/*!< sort identifier (e.g. an rpmTag) */
  +/*@refs@*/
       int nrefs;			/*!< Reference count. */
   };
   #endif	/* defined(_MIRE_INTERNAL) */
  @@ -120,6 +121,7 @@
    * @param tag		identifier (e.g. an rpmTag)
    * @return		NULL always
    */
  +/*@null@*/
   miRE mireNew(rpmMireMode mode, int tag)
   	/*@*/;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmdav.c
  ============================================================================
  $ cvs diff -u -r2.47 -r2.48 rpmdav.c
  --- rpm/rpmio/rpmdav.c	6 Oct 2007 19:40:23 -0000	2.47
  +++ rpm/rpmio/rpmdav.c	6 Oct 2007 21:33:50 -0000	2.48
  @@ -107,7 +107,9 @@
   assert(u != NULL);
       sess = u->sess;
   assert(sess != NULL);
  +/*@-sefuncon@*/
   assert(u == ne_get_session_private(sess, "urlinfo"));
  +/*@=sefuncon@*/
   
       u->current = current;
       u->total = total;
  @@ -139,7 +141,9 @@
   assert(u != NULL);
       sess = u->sess;
   assert(sess != NULL);
  +/*@-sefuncon@*/
   assert(u == ne_get_session_private(sess, "urlinfo"));
  +/*@=sefuncon@*/
   
   #ifdef	REFERENCE
   typedef enum {
  @@ -173,7 +177,9 @@
   assert(req != NULL);
       sess = ne_get_session(req);
   assert(sess == u->sess);
  +/*@-sefuncon@*/
   assert(u == ne_get_session_private(sess, "urlinfo"));
  +/*@=sefuncon@*/
   
   assert(sess != NULL);
       private = ne_get_session_private(sess, id);
  @@ -190,14 +196,18 @@
       const char * id = "fd";
       FD_t fd = NULL;
   
  +/*@-modunconnomods@*/
   assert(u != NULL);
   assert(u->sess != NULL);
   assert(req != NULL);
       sess = ne_get_session(req);
   assert(sess == u->sess);
  +/*@-sefuncon@*/
   assert(u == ne_get_session_private(sess, "urlinfo"));
  +/*@=sefuncon@*/
   
       fd = ne_get_request_private(req, id);
  +/*@=modunconnomods@*/
   
   if (_dav_debug < 0)
   fprintf(stderr, "*** davPreSend(%p,%p,%p) sess %p %s %p\n", req, userdata, buf, sess, id, fd);
  @@ -219,7 +229,9 @@
   assert(req != NULL);
       sess = ne_get_session(req);
   assert(sess == u->sess);
  +/*@-sefuncon@*/
   assert(u == ne_get_session_private(sess, "urlinfo"));
  +/*@=sefuncon@*/
   
       fd = ne_get_request_private(req, id);
   
  @@ -243,7 +255,9 @@
   assert(req != NULL);
       sess = ne_get_session(req);
   assert(sess == u->sess);
  +/*@-sefuncon@*/
   assert(u == ne_get_session_private(sess, "urlinfo"));
  +/*@=sefuncon@*/
   
       fd = ne_get_request_private(req, id);
   
  @@ -262,7 +276,9 @@
   assert(u != NULL);
   assert(u->sess != NULL);
       sess = u->sess;
  +/*@-sefuncon@*/
   assert(u == ne_get_session_private(sess, "urlinfo"));
  +/*@=sefuncon@*/
   
   assert(sess != NULL);
       private = ne_get_session_private(sess, id);
  @@ -328,9 +344,11 @@
       case NE_CONNECT:		/* HACK: errno set already? */
       default:
   bottom:
  +/*@-evalorderuncon@*/
   if (_dav_debug)
   fprintf(stderr, "*** Connect to %s:%d failed(%d):\n\t%s\n",
   		   u->host, u->port, rc, ne_get_error(u->sess));
  +/*@=evalorderuncon@*/
   	break;
       }
   
  @@ -536,11 +554,14 @@
       ctx = ne_calloc(sizeof(*ctx));
       ctx->uri = xstrdup(uri);
       ctx->u = urlLink(u, "fetch_create_context");
  +/*@-temptrans@*/	/* XXX note the assignment */
       if ((ctx->st = st) != NULL)
   	memset(ctx->st, 0, sizeof(*ctx->st));
  +/*@=temptrans@*/
       return ctx;
   }
   
  +/*@-readonlytrans@*/
   /*@unchecked@*/ /*@observer@*/
   static const ne_propname fetch_props[] = {
       { "DAV:", "getcontentlength" },
  @@ -551,15 +572,18 @@
       { "DAV:", "checked-out" },
       { NULL, NULL }
   };
  +/*@=readonlytrans@*/
   
   #define ELM_resourcetype (NE_PROPS_STATE_TOP + 1)
   #define ELM_collection (NE_PROPS_STATE_TOP + 2)
   
  +/*@-readonlytrans@*/
   /*@unchecked@*/ /*@observer@*/
   static const struct ne_xml_idmap fetch_idmap[] = {
       { "DAV:", "resourcetype", ELM_resourcetype },
       { "DAV:", "collection", ELM_collection }
   };
  +/*@=readonlytrans@*/
   
   static int fetch_startelm(void *userdata, int parent,
   		const char *nspace, const char *name,
  @@ -568,8 +592,10 @@
   {
       ne_propfind_handler *pfh = userdata;
       struct fetch_resource_s *r = ne_propfind_current_private(pfh);
  +/*@-sizeoftype@*/
       int state = ne_xml_mapid(fetch_idmap, NE_XML_MAPLEN(fetch_idmap),
                                nspace, name);
  +/*@=sizeoftype@*/
   
       if (r == NULL ||
           !((parent == NE_207_STATE_PROP && state == ELM_resourcetype) ||
  @@ -921,9 +947,11 @@
   	    break;
   	/*@fallthrough@*/
       default:
  +/*@-evalorderuncon@*/
   if (_dav_debug)
   fprintf(stderr, "*** Fetch from %s:%d failed:\n\t%s\n",
   		   u->host, u->port, ne_get_error(u->sess));
  +/*@=evalorderuncon@*/
           break;
       }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmio.c
  ============================================================================
  $ cvs diff -u -r1.94 -r1.95 rpmio.c
  --- rpm/rpmio/rpmio.c	6 Oct 2007 19:40:23 -0000	1.94
  +++ rpm/rpmio/rpmio.c	6 Oct 2007 21:33:50 -0000	1.95
  @@ -2417,6 +2417,7 @@
   }
   
   /* XXX zlib-1.0.4 has not */
  +#define	HAVE_GZSEEK	/* XXX autoFu doesn't set this anymore. */
   static inline int gzdSeek(void * cookie, _libio_pos_t pos, int whence)
   	/*@globals fileSystem, internalState @*/
   	/*@modifies fileSystem, internalState @*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmlua.c
  ============================================================================
  $ cvs diff -u -r2.21 -r2.22 rpmlua.c
  --- rpm/rpmio/rpmlua.c	6 Oct 2007 19:40:23 -0000	2.21
  +++ rpm/rpmio/rpmlua.c	6 Oct 2007 21:33:50 -0000	2.22
  @@ -603,7 +603,9 @@
         if (rc == 0)
   	 rc = lua_pcall(L, 0, 0, 0);
         if (rc != 0) {
  +/*@-evalorderuncon@*/
   	 fprintf(stderr, "%s\n", lua_tostring(L, -1));
  +/*@=evalorderuncon@*/
   	 lua_pop(L, 1);
         }
         lua_pop(L, 1); /* Remove line */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmpgp.c
  ============================================================================
  $ cvs diff -u -r2.60 -r2.61 rpmpgp.c
  --- rpm/rpmio/rpmpgp.c	6 Oct 2007 19:40:23 -0000	2.60
  +++ rpm/rpmio/rpmpgp.c	6 Oct 2007 21:33:50 -0000	2.61
  @@ -890,9 +890,9 @@
       if (pleft > 0 && pp->pktlen > pleft)
   	return -1;
   
  -/*@-assignexpose@*/
  +/*@-assignexpose -temptrans @*/
       pp->h = pkt + 1 + plen;
  -/*@=assignexpose@*/
  +/*@=assignexpose =temptrans @*/
   
       return pp->pktlen;
   }
  @@ -1201,7 +1201,9 @@
   /*@-assignexpose@*/
   	dig->findPubkey = findPubkey;
   /*@=assignexpose@*/
  +/*@-dependenttrans@*/
   	dig->_ts = _ts;
  +/*@=dependenttrans@*/
       }
       return 0;
   }
  @@ -1491,5 +1493,7 @@
       t = stpcpy(t, pgpValStr(pgpArmorTbl, atype));
       t = stpcpy(t, "-----\n");
   
  +/*@-globstate@*/	/* XXX b64encode_eolstr needs annotation. */
       return val;
  +/*@=globstate@*/
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmrpc.c
  ============================================================================
  $ cvs diff -u -r2.57 -r2.58 rpmrpc.c
  --- rpm/rpmio/rpmrpc.c	6 Oct 2007 19:40:23 -0000	2.57
  +++ rpm/rpmio/rpmrpc.c	6 Oct 2007 21:33:50 -0000	2.58
  @@ -189,9 +189,9 @@
   	/*@notreached@*/ break;
       }
   
  -/*@-modobserver@*/
  +/*@-dependenttrans -modobserver -observertrans @*/
       _chroot_prefix = _free(_chroot_prefix);
  -/*@=modobserver@*/
  +/*@=dependenttrans =modobserver =observertrans @*/
       if (strcmp(path, "."))
   	_chroot_prefix = rpmGetPath(path, NULL);
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmsq.c
  ============================================================================
  $ cvs diff -u -r1.25 -r1.26 rpmsq.c
  --- rpm/rpmio/rpmsq.c	6 Oct 2007 19:40:23 -0000	1.25
  +++ rpm/rpmio/rpmsq.c	6 Oct 2007 21:33:50 -0000	1.26
  @@ -258,7 +258,9 @@
   	    sq->pipes[0] = sq->pipes[1] = -1;
   
   	    sq->id = ME();
  +/*@-noeffect@*/
   	    insque(elem, (prev != NULL ? prev : rpmsqQueue));
  +/*@=noeffect@*/
   	    ret = sigrelse(SIGCHLD);
   	}
       }
  @@ -278,7 +280,9 @@
   #endif
   	ret = sighold (SIGCHLD);
   	if (ret == 0) {
  +/*@-noeffect@*/
   	    remque(elem);
  +/*@=noeffect@*/
   	    sq->id = NULL;
   	    if (sq->pipes[1] > 0)	ret = close(sq->pipes[1]);
   	    if (sq->pipes[0] > 0)	ret = close(sq->pipes[0]);
  @@ .
Received on Sat Oct 6 23:33:51 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.