[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpm-cvs
Subject:    [CVS] RPM: rpm-5_4: rpm/tools/ hashtab.c hashtab.h rpmdigest.c rpmfind...
From:       "Jeff Johnson" <jbj () rpm5 ! org>
Date:       2014-09-24 16:19:09
Message-ID: 20140924161909.BD8667C41B () rpm5 ! org
[Download RAW message or body]

  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:   24-Sep-2014 18:19:09
  Branch: rpm-5_4                          Handle: 2014092416190701

  Modified files:           (Branch: rpm-5_4)
    rpm/tools               hashtab.c hashtab.h rpmdigest.c rpmfind.c
                            rpmgrep.c rpmmtree.c rpmwget.c

  Log:
    - tools: RPM_GNUC_PURE suggestions.

  Summary:
    Revision    Changes     Path
    2.1.22.1    +1  -0      rpm/tools/hashtab.c
    2.1.22.1    +6  -3      rpm/tools/hashtab.h
    2.18.4.6    +2  -0      rpm/tools/rpmdigest.c
    2.15.2.4    +9  -0      rpm/tools/rpmfind.c
    2.5.4.1     +1  -0      rpm/tools/rpmgrep.c
    2.17.2.4    +1  -0      rpm/tools/rpmmtree.c
    1.5.4.2     +6  -1      rpm/tools/rpmwget.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/tools/hashtab.c
  ============================================================================
  $ cvs diff -u -r2.1 -r2.1.22.1 hashtab.c
  --- rpm/tools/hashtab.c	18 Oct 2002 16:01:59 -0000	2.1
  +++ rpm/tools/hashtab.c	24 Sep 2014 16:19:07 -0000	2.1.22.1
  @@ -220,6 +220,7 @@
      This function also assumes there are no deleted entries in the table.
      HASH is the hash value for the element to be inserted.  */
   
  +RPM_GNUC_PURE
   static void **
   find_empty_slot_for_expand (htab, hash)
        htab_t htab;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/hashtab.h
  ============================================================================
  $ cvs diff -u -r2.1 -r2.1.22.1 hashtab.h
  --- rpm/tools/hashtab.h	18 Oct 2002 16:01:59 -0000	2.1
  +++ rpm/tools/hashtab.h	24 Sep 2014 16:19:07 -0000	2.1.22.1
  @@ -126,9 +126,12 @@
   
   extern void	htab_traverse	(htab_t, htab_trav, void *);
   
  -extern size_t	htab_size	(htab_t);
  -extern size_t	htab_elements	(htab_t);
  -extern double	htab_collisions	(htab_t);
  +extern size_t	htab_size	(htab_t)
  +	RPM_GNUC_PURE;
  +extern size_t	htab_elements	(htab_t)
  +	RPM_GNUC_PURE;
  +extern double	htab_collisions	(htab_t)
  +	RPM_GNUC_PURE;
   
   /* A hash function for pointers.  */
   extern htab_hash htab_hash_pointer;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/rpmdigest.c
  ============================================================================
  $ cvs diff -u -r2.18.4.5 -r2.18.4.6 rpmdigest.c
  --- rpm/tools/rpmdigest.c	27 Jun 2013 14:42:53 -0000	2.18.4.5
  +++ rpm/tools/rpmdigest.c	24 Sep 2014 16:19:07 -0000	2.18.4.6
  @@ -93,6 +93,7 @@
   static const char hmackey[] = "orboDeJITITejsirpADONivirpUkvarP";
   
   /*==============================================================*/
  +RPM_GNUC_PURE
   static uint32_t rpmdcName2Algo(const char * dname)
   	/*@*/
   {
  @@ -119,6 +120,7 @@
   }
   
   /*@null@*/
  +RPM_GNUC_PURE
   static const char * rpmdcAlgo2Name(uint32_t dalgo)
   	/*@*/
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/rpmfind.c
  ============================================================================
  $ cvs diff -u -r2.15.2.3 -r2.15.2.4 rpmfind.c
  --- rpm/tools/rpmfind.c	23 Oct 2013 18:43:19 -0000	2.15.2.3
  +++ rpm/tools/rpmfind.c	24 Sep 2014 16:19:07 -0000	2.15.2.4
  @@ -218,6 +218,7 @@
    * Note that there is no '=' command; a strict assignment is just a '-' (clear
    * bits) followed by a '+' (set bits).
    */
  +RPM_GNUC_PURE
   static mode_t
   getmode(const void * bbox, mode_t omode)
   	/*@*/
  @@ -1306,6 +1307,7 @@
    *		file modification time (-mmin)
    *    and the current time is n min periods.
    */
  +RPM_GNUC_PURE
   static int
   f_Xmin(PLAN *plan, FTSENT *entry)
   {
  @@ -1348,6 +1350,7 @@
    *	and the current time is n 24 hour periods.
    */
   
  +RPM_GNUC_PURE
   static int
   f_Xtime(PLAN *plan, FTSENT *entry)
   {
  @@ -1542,6 +1545,7 @@
    *	to be done so that all entries in a directory are acted on before the
    *	directory itself.
    */
  +RPM_GNUC_PURE
   static int
   f_depth(PLAN *plan, FTSENT *entry)
   {
  @@ -2005,6 +2009,7 @@
    *	an equivalent of the getgrnam() function does not return a valid group
    *	name, gname is taken as a group ID.
    */
  +RPM_GNUC_PURE
   static int
   f_group(PLAN *plan, FTSENT *entry)
   {
  @@ -2042,6 +2047,7 @@
    *
    *	True if the file has inode # n.
    */
  +RPM_GNUC_PURE
   static int
   f_inum(PLAN *plan, FTSENT *entry)
   {
  @@ -2087,6 +2093,7 @@
    *
    *	True if the file has n links.
    */
  +RPM_GNUC_PURE
   static int
   f_links(PLAN *plan, FTSENT *entry)
   {
  @@ -2431,6 +2438,7 @@
   #define	FIND_SIZE	512
   static int divsize = 1;
   
  +RPM_GNUC_PURE
   static int
   f_size(PLAN *plan, FTSENT *entry)
   {
  @@ -2551,6 +2559,7 @@
    *	an equivalent of the getpwnam() S9.2.2 [POSIX.1] function does not
    *	return a valid user name, uname is taken as a user ID.
    */
  +RPM_GNUC_PURE
   static int
   f_user(PLAN *plan, FTSENT *entry)
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/rpmgrep.c
  ============================================================================
  $ cvs diff -u -r2.5 -r2.5.4.1 rpmgrep.c
  --- rpm/tools/rpmgrep.c	3 Jul 2009 18:19:32 -0000	2.5
  +++ rpm/tools/rpmgrep.c	24 Sep 2014 16:19:07 -0000	2.5.4.1
  @@ -368,6 +368,7 @@
    * @return 		pointer to the start of the previous line
    */
   /*@observer@*/
  +RPM_GNUC_PURE
   static const char *
   previous_line(const char *p, const char *startptr)
   	/*@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/rpmmtree.c
  ============================================================================
  $ cvs diff -u -r2.17.2.3 -r2.17.2.4 rpmmtree.c
  --- rpm/tools/rpmmtree.c	23 Oct 2013 18:43:20 -0000	2.17.2.3
  +++ rpm/tools/rpmmtree.c	24 Sep 2014 16:19:08 -0000	2.17.2.4
  @@ -1009,6 +1009,7 @@
    * Note that there is no '=' command; a strict assignment is just a '-' (clear
    * bits) followed by a '+' (set bits).
    */
  +RPM_GNUC_PURE
   static mode_t
   getmode(const void * bbox, mode_t omode)
   	/*@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/rpmwget.c
  ============================================================================
  $ cvs diff -u -r1.5.4.1 -r1.5.4.2 rpmwget.c
  --- rpm/tools/rpmwget.c	4 Jun 2012 15:10:41 -0000	1.5.4.1
  +++ rpm/tools/rpmwget.c	24 Sep 2014 16:19:08 -0000	1.5.4.2
  @@ -1448,6 +1448,9 @@
   
   };
   
  +extern int _dav_cb_debug;
  +extern int _dav_hook_debug;
  +
   int
   main(int argc, char *argv[])
   	/*@globals __assert_program_name,
  @@ -1477,7 +1480,9 @@
   if (wget->debug < 0) {
   _av_debug = -1;
   _ftp_debug = -1;
  -_dav_debug = 1;
  +_dav_debug = 1;	/* XXX normally 1 */
  +_dav_cb_debug = -1;
  +_dav_hook_debug = -1;
   #if 0
   _url_debug = -1;
   _rpmio_debug = -1;
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic