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: 24-Sep-2014 15:03:07 Branch: rpm-5_4 Handle: 2014092413030202 Modified files: (Branch: rpm-5_4) rpm system.h rpm/rpmio argv.h bson.h bzdio.c crc.c crc.h echo.c fts.c getdate.y glob.c gzdio.c iosm.h macro.c mongo.c mongo.h poptIO.c rpmcdsa.c rpmdir.h rpmficl.c rpmhash.h rpmhkp.c rpmio_internal.h rpmiotypes.h rpmjni.cc rpmlog.h rpmltc.c rpmlua.h rpmmalloc.c rpmmrb.c rpmnss.c rpmperl.c rpmpgp.h rpmruby.c rpmsq.c rpmsql.c rpmssl.c rpmsw.h rpmtcl.c rpmurl.h rpmuuid.c set.c url.c xzdio.c yarn.h Log: - rpmio: RPM_GNUC_PURE suggestions. - rpmio: RPM_GNUC_NORETURN suggestions. Summary: Revision Changes Path 1.17.4.3 +6 -0 rpm/rpmio/argv.h 2.3.4.7 +30 -14 rpm/rpmio/bson.h 2.24.4.2 +2 -0 rpm/rpmio/bzdio.c 2.2.4.2 +2 -0 rpm/rpmio/crc.c 2.1.6.1 +1 -0 rpm/rpmio/crc.h 2.1.4.2 +3 -1 rpm/rpmio/echo.c 1.41.4.4 +1 -0 rpm/rpmio/fts.c 2.2.8.2 +3 -0 rpm/rpmio/getdate.y 2.6.2.3 +4 -0 rpm/rpmio/glob.c 2.17.4.2 +3 -1 rpm/rpmio/gzdio.c 1.18.4.3 +1 -0 rpm/rpmio/iosm.h 2.249.2.23 +1 -0 rpm/rpmio/macro.c 2.3.4.9 +6 -3 rpm/rpmio/mongo.c 2.2.4.6 +26 -13 rpm/rpmio/mongo.h 1.94.2.16 +1 -0 rpm/rpmio/poptIO.c 1.3.2.2 +2 -2 rpm/rpmio/rpmcdsa.c 2.4.4.1 +2 -0 rpm/rpmio/rpmdir.h 2.5.2.2 +1 -0 rpm/rpmio/rpmficl.c 1.12.4.1 +2 -0 rpm/rpmio/rpmhash.h 2.20.2.8 +1 -0 rpm/rpmio/rpmhkp.c 2.127.2.6 +38 -14 rpm/rpmio/rpmio_internal.h 1.47.2.19 +14 -3 rpm/rpmio/rpmiotypes.h 1.1.2.5 +3 -1 rpm/rpmio/rpmjni.cc 2.24.4.2 +5 -0 rpm/rpmio/rpmlog.h 1.2.4.12 +1 -1 rpm/rpmio/rpmltc.c 2.18.4.3 +3 -0 rpm/rpmio/rpmlua.h 1.29.2.4 +2 -0 rpm/rpmio/rpmmalloc.c 1.1.2.3 +2 -0 rpm/rpmio/rpmmrb.c 1.40.2.17 +2 -1 rpm/rpmio/rpmnss.c 2.12.2.3 +1 -0 rpm/rpmio/rpmperl.c 2.108.2.14 +30 -7 rpm/rpmio/rpmpgp.h 2.16.2.3 +2 -0 rpm/rpmio/rpmruby.c 1.42.6.5 +2 -0 rpm/rpmio/rpmsq.c 2.59.2.12 +2 -0 rpm/rpmio/rpmsql.c 2.42.2.15 +2 -1 rpm/rpmio/rpmssl.c 2.12.4.2 +1 -0 rpm/rpmio/rpmsw.h 2.13.2.2 +1 -0 rpm/rpmio/rpmtcl.c 1.41.4.7 +2 -0 rpm/rpmio/rpmurl.h 2.5.10.2 +3 -0 rpm/rpmio/rpmuuid.c 1.1.2.11 +3 -1 rpm/rpmio/set.c 1.73.4.11 +2 -1 rpm/rpmio/url.c 1.14.4.2 +2 -0 rpm/rpmio/xzdio.c 2.4.2.3 +1 -0 rpm/rpmio/yarn.h 2.129.2.11 +3 -0 rpm/system.h ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmio/argv.h ============================================================================ $ cvs diff -u -r1.17.4.2 -r1.17.4.3 argv.h --- rpm/rpmio/argv.h 29 Aug 2014 17:27:53 -0000 1.17.4.2 +++ rpm/rpmio/argv.h 24 Sep 2014 13:03:03 -0000 1.17.4.3 @@ -56,6 +56,7 @@ * @return no. of elements */ int argiCount(/*@null@*/ const ARGI_t argi) + RPM_GNUC_PURE /*@*/; /** @@ -65,6 +66,7 @@ */ /*@null@*/ ARGint_t argiData(/*@null@*/ ARGI_t argi) + RPM_GNUC_PURE /*@*/; /** @@ -73,6 +75,7 @@ * @return no. of elements */ int argvCount(/*@null@*/ ARGV_t argv) + RPM_GNUC_PURE /*@*/; /** @@ -92,6 +95,7 @@ */ /*@-exportlocal@*/ int argiCmp(ARGint_t * a, ARGint_t * b) + RPM_GNUC_PURE /*@*/; /*@=exportlocal@*/ @@ -103,6 +107,7 @@ */ /*@-exportlocal@*/ int argvCmp(ARGstr_t * a, ARGstr_t * b) + RPM_GNUC_PURE /*@*/; /*@=exportlocal@*/ @@ -113,6 +118,7 @@ * @return result of comparison */ int argvStrcasecmp(ARGstr_t * a, ARGstr_t * b) + RPM_GNUC_PURE /*@*/; #if defined(RPM_VENDOR_OPENPKG) /* wildcard-matching-arbitrary-tagnames */ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/bson.h ============================================================================ $ cvs diff -u -r2.3.4.6 -r2.3.4.7 bson.h --- rpm/rpmio/bson.h 20 Jul 2014 00:07:11 -0000 2.3.4.6 +++ rpm/rpmio/bson.h 24 Sep 2014 13:03:03 -0000 2.3.4.7 @@ -25,6 +25,8 @@ #include <stdio.h> #include <time.h> +#include <rpmutil.h> + #ifdef __GNUC__ #define MONGO_INLINE static __inline__ #define MONGO_EXPORT @@ -222,7 +224,8 @@ * * @return the BSON object's minimum finished size */ -MONGO_EXPORT size_t bson_buffer_size( const bson *b ); +MONGO_EXPORT size_t bson_buffer_size( const bson *b ) + RPM_GNUC_PURE; /** * Print a string representation of a BSON object. @@ -236,7 +239,8 @@ * * @param b a BSON object */ -MONGO_EXPORT const char *bson_data( const bson *b ); +MONGO_EXPORT const char *bson_data( const bson *b ) + RPM_GNUC_PURE; /** * Returns true if bson_data(b) {b->data} is not null; else, false. @@ -296,7 +300,8 @@ * * @return returns true if there is more data. */ -MONGO_EXPORT bson_bool_t bson_iterator_more( const bson_iterator *i ); +MONGO_EXPORT bson_bool_t bson_iterator_more( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Point the iterator at the next BSON object. @@ -314,7 +319,8 @@ * * @return the type of the current BSON object. */ -MONGO_EXPORT bson_type bson_iterator_type( const bson_iterator *i ); +MONGO_EXPORT bson_type bson_iterator_type( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the key of the BSON object currently pointed to by the iterator. @@ -323,7 +329,8 @@ * * @return the key of the current BSON object. */ -MONGO_EXPORT const char *bson_iterator_key( const bson_iterator *i ); +MONGO_EXPORT const char *bson_iterator_key( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the value of the BSON object currently pointed to by the iterator. @@ -332,7 +339,8 @@ * * @return the value of the current BSON object. */ -MONGO_EXPORT const char *bson_iterator_value( const bson_iterator *i ); +MONGO_EXPORT const char *bson_iterator_value( const bson_iterator *i ) + RPM_GNUC_PURE; /* these convert to the right type (return 0 if non-numeric) */ /** @@ -427,7 +435,8 @@ * * @return the value of the current BSON object. */ -bson_bool_t bson_iterator_bool_raw( const bson_iterator *i ); +bson_bool_t bson_iterator_bool_raw( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the bson_oid_t value of the BSON object currently pointed to by the @@ -437,7 +446,8 @@ * * @return the value of the current BSON object. */ -MONGO_EXPORT bson_oid_t *bson_iterator_oid( const bson_iterator *i ); +MONGO_EXPORT bson_oid_t *bson_iterator_oid( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the string value of the BSON object currently pointed to by the @@ -448,7 +458,8 @@ * @return the value of the current BSON object. */ /* these can also be used with bson_code and bson_symbol*/ -MONGO_EXPORT const char *bson_iterator_string( const bson_iterator *i ); +MONGO_EXPORT const char *bson_iterator_string( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the string length of the BSON object currently pointed to by the @@ -471,7 +482,8 @@ */ /* works with bson_code, bson_codewscope, and BSON_STRING */ /* returns NULL for everything else */ -MONGO_EXPORT const char *bson_iterator_code( const bson_iterator *i ); +MONGO_EXPORT const char *bson_iterator_code( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the code scope value of the BSON object currently pointed to @@ -529,7 +541,8 @@ * * @return the type of the current BSON binary object. */ -MONGO_EXPORT char bson_iterator_bin_type( const bson_iterator *i ); +MONGO_EXPORT char bson_iterator_bin_type( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the value of the BSON binary object currently pointed to by the @@ -539,7 +552,8 @@ * * @return the value of the current BSON binary object. */ -MONGO_EXPORT const char *bson_iterator_bin_data( const bson_iterator *i ); +MONGO_EXPORT const char *bson_iterator_bin_data( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the value of the BSON regex object currently pointed to by the @@ -549,7 +563,8 @@ * * @return the value of the current BSON regex object. */ -MONGO_EXPORT const char *bson_iterator_regex( const bson_iterator *i ); +MONGO_EXPORT const char *bson_iterator_regex( const bson_iterator *i ) + RPM_GNUC_PURE; /** * Get the options of the BSON regex object currently pointed to by the @@ -559,7 +574,8 @@ * * @return the options of the current BSON regex object. */ -MONGO_EXPORT const char *bson_iterator_regex_opts( const bson_iterator *i ); +MONGO_EXPORT const char *bson_iterator_regex_opts( const bson_iterator *i ) + RPM_GNUC_PURE; /* these work with BSON_OBJECT and BSON_ARRAY */ /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/bzdio.c ============================================================================ $ cvs diff -u -r2.24.4.1 -r2.24.4.2 bzdio.c --- rpm/rpmio/bzdio.c 14 Apr 2012 20:44:46 -0000 2.24.4.1 +++ rpm/rpmio/bzdio.c 24 Sep 2014 13:03:03 -0000 2.24.4.2 @@ -315,6 +315,7 @@ } /* =============================================================== */ +RPM_GNUC_PURE static inline /*@dependent@*/ /*@null@*/ void * bzdFileno(FD_t fd) /*@*/ { @@ -435,6 +436,7 @@ } /*@=globuse@*/ +RPM_GNUC_PURE static int bzdSeek(void * cookie, _libio_pos_t pos, int whence) /*@*/ { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/crc.c ============================================================================ $ cvs diff -u -r2.2.4.1 -r2.2.4.2 crc.c --- rpm/rpmio/crc.c 16 Apr 2012 03:21:22 -0000 2.2.4.1 +++ rpm/rpmio/crc.c 24 Sep 2014 13:03:03 -0000 2.2.4.2 @@ -53,6 +53,7 @@ /** */ +RPM_GNUC_PURE static rpmuint32_t gf2_matrix_times32(rpmuint32_t *mat, rpmuint32_t vec) /*@*/ { @@ -184,6 +185,7 @@ /** */ +RPM_GNUC_PURE static rpmuint64_t gf2_matrix_times64(rpmuint64_t *mat, rpmuint64_t vec) /*@*/ { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/crc.h ============================================================================ $ cvs diff -u -r2.1 -r2.1.6.1 crc.h --- rpm/rpmio/crc.h 14 Oct 2008 19:24:10 -0000 2.1 +++ rpm/rpmio/crc.h 24 Sep 2014 13:03:03 -0000 2.1.6.1 @@ -51,6 +51,7 @@ /** */ rpmuint32_t __adler32(rpmuint32_t adler, const rpmuint8_t * buf, rpmuint32_t len) + RPM_GNUC_PURE /*@*/; /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/echo.c ============================================================================ $ cvs diff -u -r2.1.4.1 -r2.1.4.2 echo.c --- rpm/rpmio/echo.c 23 Oct 2013 18:23:58 -0000 2.1.4.1 +++ rpm/rpmio/echo.c 24 Sep 2014 13:03:03 -0000 2.1.4.2 @@ -12,6 +12,7 @@ * Vincent Rijmen *******************************************************************************/ +#include <rpmutil.h> #include <stdio.h> #include "echo.h" @@ -99,7 +100,8 @@ void Pad(hashState *state); void Push(hashState *state, uint8_t a); uint8_t Pop(hashState *state); -uint8_t * Stack(hashState *state); +uint8_t * Stack(hashState *state) + RPM_GNUC_PURE; void SubByte(uint8_t a[4][4]); void ShiftRows(uint8_t a[4][4]); void MixColumns(uint8_t a[4][4]); @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/fts.c ============================================================================ $ cvs diff -u -r1.41.4.3 -r1.41.4.4 fts.c --- rpm/rpmio/fts.c 29 Jun 2013 02:32:25 -0000 1.41.4.3 +++ rpm/rpmio/fts.c 24 Sep 2014 13:03:03 -0000 1.41.4.4 @@ -176,6 +176,7 @@ static void fts_load(FTS * sp, FTSENT * p) /*@modifies *sp, *p @*/; static size_t fts_maxarglen(char * const * argv) + RPM_GNUC_PURE /*@*/; static void fts_padjust(FTS * sp, FTSENT * head) /*@modifies *sp, *head @*/; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/getdate.y ============================================================================ $ cvs diff -u -r2.2.8.1 -r2.2.8.2 getdate.y --- rpm/rpmio/getdate.y 23 Sep 2014 18:32:12 -0000 2.2.8.1 +++ rpm/rpmio/getdate.y 24 Sep 2014 13:03:03 -0000 2.2.8.2 @@ -95,6 +95,8 @@ #include <stdlib.h> #endif +#include <rpmutil.h> + /* NOTES on rebuilding getdate.c (particularly for inclusion in CVS releases): @@ -624,6 +626,7 @@ } +RPM_GNUC_PURE static time_t ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian) /*@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/glob.c ============================================================================ $ cvs diff -u -r2.6.2.2 -r2.6.2.3 glob.c --- rpm/rpmio/glob.c 18 Apr 2012 17:06:22 -0000 2.6.2.2 +++ rpm/rpmio/glob.c 24 Sep 2014 13:03:03 -0000 2.6.2.3 @@ -47,6 +47,8 @@ # include "system.h" +#include <rpmiotypes.h> + /* Needed for offsetof() */ # include <stddef.h> @@ -124,6 +126,7 @@ /* Find the end of the sub-pattern in a brace expression. We define this as an inline function if the compiler permits. */ +RPM_GNUC_PURE static inline const char * next_brace_sub (const char *begin) { @@ -973,6 +976,7 @@ #if !defined _LIBC || !defined NO_GLOB_PATTERN_P /* Return nonzero if PATTERN contains any metacharacters. Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ +RPM_GNUC_PURE static int __glob_pattern_p (const char *pattern, int quote) { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/gzdio.c ============================================================================ $ cvs diff -u -r2.17.4.1 -r2.17.4.2 gzdio.c --- rpm/rpmio/gzdio.c 16 Apr 2012 03:21:22 -0000 2.17.4.1 +++ rpm/rpmio/gzdio.c 24 Sep 2014 13:03:03 -0000 2.17.4.2 @@ -229,7 +229,9 @@ /* =============================================================== */ /*@-moduncon@*/ -static inline /*@dependent@*/ /*@null@*/ void * gzdFileno(FD_t fd) +RPM_GNUC_PURE +static inline /*@dependent@*/ /*@null@*/ +void * gzdFileno(FD_t fd) /*@*/ { void * rc = NULL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/iosm.h ============================================================================ $ cvs diff -u -r1.18.4.2 -r1.18.4.3 iosm.h --- rpm/rpmio/iosm.h 20 Jul 2014 00:07:35 -0000 1.18.4.2 +++ rpm/rpmio/iosm.h 24 Sep 2014 13:03:03 -0000 1.18.4.3 @@ -415,6 +415,7 @@ * @return transaction element file info */ void * iosmGetFi(/*@partial@*/ const IOSM_t iosm) + RPM_GNUC_PURE /*@*/; /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/macro.c ============================================================================ $ cvs diff -u -r2.249.2.22 -r2.249.2.23 macro.c --- rpm/rpmio/macro.c 21 Sep 2014 22:21:04 -0000 2.249.2.22 +++ rpm/rpmio/macro.c 24 Sep 2014 13:03:03 -0000 2.249.2.23 @@ -471,6 +471,7 @@ * @return address of last char before pr (or NULL) */ /*@null@*/ +RPM_GNUC_PURE static const char * matchchar(const char * p, char pl, char pr) /*@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/mongo.c ============================================================================ $ cvs diff -u -r2.3.4.8 -r2.3.4.9 mongo.c --- rpm/rpmio/mongo.c 26 Jul 2013 06:09:06 -0000 2.3.4.8 +++ rpm/rpmio/mongo.c 24 Sep 2014 13:03:03 -0000 2.3.4.9 @@ -236,7 +236,8 @@ * Returns whether or not the GridFile exists * @param gfile - the GridFile being examined */ -MONGO_EXPORT bson_bool_t gridfile_exists( const gridfile *gfile ); +MONGO_EXPORT bson_bool_t gridfile_exists( const gridfile *gfile ) + RPM_GNUC_PURE; /** * Returns the filename of GridFile @@ -318,7 +319,8 @@ * * @return - the caseInsensitive flag of the gfs */ -MONGO_EXPORT bson_bool_t gridfs_get_caseInsensitive( const gridfs *gfs ); +MONGO_EXPORT bson_bool_t gridfs_get_caseInsensitive( const gridfs *gfs ) + RPM_GNUC_PURE; /** * Sets the caseInsensitive flag value of gfs @@ -344,7 +346,8 @@ * * @return - void */ -MONGO_EXPORT int gridfile_get_flags( const gridfile *gfile ); +MONGO_EXPORT int gridfile_get_flags( const gridfile *gfile ) + RPM_GNUC_PURE; /** * Returns a boolean field in GridFile specified by name @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/mongo.h ============================================================================ $ cvs diff -u -r2.2.4.5 -r2.2.4.6 mongo.h --- rpm/rpmio/mongo.h 9 Jul 2013 12:04:25 -0000 2.2.4.5 +++ rpm/rpmio/mongo.h 24 Sep 2014 13:03:03 -0000 2.2.4.6 @@ -422,12 +422,18 @@ * The following functions get the attributes of the write_concern object. * */ -MONGO_EXPORT int mongo_write_concern_get_w( mongo_write_concern *write_concern ); -MONGO_EXPORT int mongo_write_concern_get_wtimeout( mongo_write_concern *write_concern ); -MONGO_EXPORT int mongo_write_concern_get_j( mongo_write_concern *write_concern ); -MONGO_EXPORT int mongo_write_concern_get_fsync( mongo_write_concern *write_concern ); -MONGO_EXPORT const char* mongo_write_concern_get_mode( mongo_write_concern *write_concern ); -MONGO_EXPORT bson* mongo_write_concern_get_cmd( mongo_write_concern *write_concern ); +MONGO_EXPORT int mongo_write_concern_get_w( mongo_write_concern *write_concern ) + RPM_GNUC_PURE; +MONGO_EXPORT int mongo_write_concern_get_wtimeout( mongo_write_concern *write_concern ) + RPM_GNUC_PURE; +MONGO_EXPORT int mongo_write_concern_get_j( mongo_write_concern *write_concern ) + RPM_GNUC_PURE; +MONGO_EXPORT int mongo_write_concern_get_fsync( mongo_write_concern *write_concern ) + RPM_GNUC_PURE; +MONGO_EXPORT const char* mongo_write_concern_get_mode( mongo_write_concern *write_concern ) + RPM_GNUC_PURE; +MONGO_EXPORT bson* mongo_write_concern_get_cmd( mongo_write_concern *write_concern ) + RPM_GNUC_PURE; /** * The following functions set the attributes of the write_concern object. @@ -632,7 +638,8 @@ * * @param cursor */ -MONGO_EXPORT const char *mongo_cursor_data( mongo_cursor *cursor ); +MONGO_EXPORT const char *mongo_cursor_data( mongo_cursor *cursor ) + RPM_GNUC_PURE; /** * Return the current BSON object data as a const char*. This is useful @@ -897,18 +904,24 @@ MONGO_EXPORT mongo* mongo_alloc( void ); MONGO_EXPORT void mongo_dealloc(mongo* conn); -MONGO_EXPORT int mongo_get_err(mongo* conn); -MONGO_EXPORT int mongo_is_connected(mongo* conn); -MONGO_EXPORT int mongo_get_op_timeout(mongo* conn); +MONGO_EXPORT int mongo_get_err(mongo* conn) + RPM_GNUC_PURE; +MONGO_EXPORT int mongo_is_connected(mongo* conn) + RPM_GNUC_PURE; +MONGO_EXPORT int mongo_get_op_timeout(mongo* conn) + RPM_GNUC_PURE; MONGO_EXPORT const char* mongo_get_primary(mongo* conn); -MONGO_EXPORT SOCKET mongo_get_socket(mongo* conn) ; -MONGO_EXPORT int mongo_get_host_count(mongo* conn); +MONGO_EXPORT SOCKET mongo_get_socket(mongo* conn) + RPM_GNUC_PURE; +MONGO_EXPORT int mongo_get_host_count(mongo* conn) + RPM_GNUC_PURE; MONGO_EXPORT const char* mongo_get_host(mongo* conn, int i); MONGO_EXPORT mongo_write_concern* mongo_write_concern_alloc( void ); MONGO_EXPORT void mongo_write_concern_dealloc(mongo_write_concern* write_concern); MONGO_EXPORT mongo_cursor* mongo_cursor_alloc( void ); MONGO_EXPORT void mongo_cursor_dealloc(mongo_cursor* cursor); -MONGO_EXPORT int mongo_get_server_err(mongo* conn); +MONGO_EXPORT int mongo_get_server_err(mongo* conn) + RPM_GNUC_PURE; MONGO_EXPORT const char* mongo_get_server_err_string(mongo* conn); /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/poptIO.c ============================================================================ $ cvs diff -u -r1.94.2.15 -r1.94.2.16 poptIO.c --- rpm/rpmio/poptIO.c 21 Sep 2014 21:40:55 -0000 1.94.2.15 +++ rpm/rpmio/poptIO.c 24 Sep 2014 13:03:03 -0000 1.94.2.16 @@ -962,6 +962,7 @@ * @return pointer to matching pr char in string (or NULL) */ /*@null@*/ +RPM_GNUC_PURE static char * matchchar(char * p, char pl, char pr) /*@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmcdsa.c ============================================================================ $ cvs diff -u -r1.3.2.1 -r1.3.2.2 rpmcdsa.c --- rpm/rpmio/rpmcdsa.c 17 Sep 2014 03:36:21 -0000 1.3.2.1 +++ rpm/rpmio/rpmcdsa.c 24 Sep 2014 13:03:03 -0000 1.3.2.2 @@ -3,12 +3,12 @@ */ #include "system.h" -#include <rpmlog.h> #include <rpmiotypes.h> +#include <rpmlog.h> + #define _RPMPGP_INTERNAL #if defined(WITH_CDSA) - #define _RPMCDSA_INTERNAL #include <rpmcdsa.h> #endif @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmdir.h ============================================================================ $ cvs diff -u -r2.4 -r2.4.4.1 rpmdir.h --- rpm/rpmio/rpmdir.h 10 Dec 2009 18:47:58 -0000 2.4 +++ rpm/rpmio/rpmdir.h 24 Sep 2014 13:03:03 -0000 2.4.4.1 @@ -205,8 +205,10 @@ int (*compar) (const void *, const void *)) /*@modifies *nl @*/; int Alphasort(const void * a, const void * b) + RPM_GNUC_PURE /*@*/; int Versionsort(const void * a, const void * b) + RPM_GNUC_PURE /*@*/; /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmficl.c ============================================================================ $ cvs diff -u -r2.5.2.1 -r2.5.2.2 rpmficl.c --- rpm/rpmio/rpmficl.c 16 Apr 2012 20:53:33 -0000 2.5.2.1 +++ rpm/rpmio/rpmficl.c 24 Sep 2014 13:03:03 -0000 2.5.2.2 @@ -1,5 +1,6 @@ #include "system.h" +#include <rpmiotypes.h> #include <argv.h> #ifdef WITH_FICL @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmhash.h ============================================================================ $ cvs diff -u -r1.12 -r1.12.4.1 rpmhash.h --- rpm/rpmio/rpmhash.h 11 May 2009 11:43:23 -0000 1.12 +++ rpm/rpmio/rpmhash.h 24 Sep 2014 13:03:03 -0000 1.12.4.1 @@ -32,6 +32,7 @@ * @return 0 if entries are equal */ int hashEqualityString(const void * key1, const void * key2) + RPM_GNUC_PURE /*@*/; /** @@ -53,6 +54,7 @@ * @return hash value */ rpmuint32_t hashFunctionString(rpmuint32_t h, const void * data, size_t size) + RPM_GNUC_PURE /*@*/; /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmhkp.c ============================================================================ $ cvs diff -u -r2.20.2.7 -r2.20.2.8 rpmhkp.c --- rpm/rpmio/rpmhkp.c 23 Sep 2014 18:32:12 -0000 2.20.2.7 +++ rpm/rpmio/rpmhkp.c 24 Sep 2014 13:03:03 -0000 2.20.2.8 @@ -276,6 +276,7 @@ return sigtime; } +RPM_GNUC_PURE static rpmuint8_t ppSigType(pgpPkt pp) { rpmuint8_t sigtype = 0; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmio_internal.h ============================================================================ $ cvs diff -u -r2.127.2.5 -r2.127.2.6 rpmio_internal.h --- rpm/rpmio/rpmio_internal.h 16 Sep 2014 19:09:20 -0000 2.127.2.5 +++ rpm/rpmio/rpmio_internal.h 24 Sep 2014 13:03:04 -0000 2.127.2.6 @@ -183,8 +183,11 @@ /** \ingroup rpmio */ -/*@unused@*/ static inline -/*@null@*/ /*@observer@*/ const char * fdGetOPath(FD_t fd) +/*@unused@*/ +RPM_GNUC_PURE +static inline +/*@null@*/ /*@observer@*/ +const char * fdGetOPath(FD_t fd) /*@*/ { FDSANE(fd); @@ -252,8 +255,11 @@ /** \ingroup rpmio */ -/*@unused@*/ static inline -/*@null@*/ rpmxar fdGetXAR(FD_t fd) +/*@unused@*/ +RPM_GNUC_PURE +static inline +/*@null@*/ +rpmxar fdGetXAR(FD_t fd) /*@*/ { FDSANE(fd); @@ -264,8 +270,11 @@ /** \ingroup rpmio */ -/*@unused@*/ static inline -/*@null@*/ FDIO_t fdGetIo(FD_t fd) +/*@unused@*/ +RPM_GNUC_PURE +static inline +/*@null@*/ +FDIO_t fdGetIo(FD_t fd) /*@*/ { FDSANE(fd); @@ -288,8 +297,11 @@ /** \ingroup rpmio */ -/*@unused@*/ static inline -/*@exposed@*/ /*@dependent@*/ /*@null@*/ FILE * fdGetFILE(FD_t fd) +/*@unused@*/ +RPM_GNUC_PURE +static inline +/*@exposed@*/ /*@dependent@*/ /*@null@*/ +FILE * fdGetFILE(FD_t fd) /*@*/ { FDSANE(fd); @@ -300,8 +312,11 @@ /** \ingroup rpmio */ -/*@unused@*/ static inline -/*@exposed@*/ /*@dependent@*/ /*@null@*/ void * fdGetFp(FD_t fd) +/*@unused@*/ +RPM_GNUC_PURE +static inline +/*@exposed@*/ /*@dependent@*/ /*@null@*/ +void * fdGetFp(FD_t fd) /*@*/ { FDSANE(fd); @@ -324,7 +339,9 @@ /** \ingroup rpmio */ -/*@unused@*/ static inline +/*@unused@*/ +RPM_GNUC_PURE +static inline int fdGetFdno(FD_t fd) /*@*/ { @@ -489,7 +506,9 @@ /** \ingroup rpmio */ -/*@unused@*/ static inline +/*@unused@*/ +RPM_GNUC_PURE +static inline unsigned long long fdGetCpioPos(FD_t fd) /*@*/ { @@ -509,7 +528,10 @@ /** \ingroup rpmio */ -/*@mayexit@*/ /*@unused@*/ static inline +/*@mayexit@*/ +/*@unused@*/ +RPM_GNUC_PURE +static inline FD_t c2f(/*@null@*/ void * cookie) /*@*/ { @@ -650,7 +672,9 @@ /*@-shadow@*/ /** \ingroup rpmio */ -/*@unused@*/ static inline +/*@unused@*/ +RPM_GNUC_PURE +static inline int fdFileno(/*@null@*/ void * cookie) /*@*/ { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmiotypes.h ============================================================================ $ cvs diff -u -r1.47.2.18 -r1.47.2.19 rpmiotypes.h --- rpm/rpmio/rpmiotypes.h 21 Sep 2014 06:52:13 -0000 1.47.2.18 +++ rpm/rpmio/rpmiotypes.h 24 Sep 2014 13:03:04 -0000 1.47.2.19 @@ -5,6 +5,8 @@ * \file rpmio/rpmiotypes.h */ +#include <rpmutil.h> + /** \ingroup rpmio * RPM return codes. */ @@ -224,7 +226,8 @@ extern "C" { #endif -void * _cphParam(/*@null@*/ CIPHER_CTX cph); +void * _cphParam(/*@null@*/ CIPHER_CTX cph) + RPM_GNUC_PURE; /** \ingroup rpmpgp * Initialize cipher context. @@ -438,6 +441,7 @@ * @return digest hash algorithm identifier */ pgpHashAlgo rpmDigestAlgo(DIGEST_CTX ctx) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ -446,6 +450,7 @@ * @return digest flags */ rpmDigestFlags rpmDigestF(DIGEST_CTX ctx) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ -455,6 +460,7 @@ */ /*@observer@*/ const char * rpmDigestName(DIGEST_CTX ctx) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ -465,6 +471,7 @@ */ /*@observer@*/ /*@null@*/ const char * rpmDigestASN1(DIGEST_CTX ctx) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ -581,12 +588,16 @@ /** \ingroup rpmio * Locale insensitive strcasecmp(3). */ -int xstrcasecmp(const char * s1, const char * s2) /*@*/; +int xstrcasecmp(const char * s1, const char * s2) + RPM_GNUC_PURE + /*@*/; /** \ingroup rpmio * Locale insensitive strncasecmp(3). */ -int xstrncasecmp(const char *s1, const char * s2, size_t n) /*@*/; +int xstrncasecmp(const char *s1, const char * s2, size_t n) + RPM_GNUC_PURE + /*@*/; /** \ingroup rpmio * Force encoding of string. @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmjni.cc ============================================================================ $ cvs diff -u -r1.1.2.4 -r1.1.2.5 rpmjni.cc --- rpm/rpmio/rpmjni.cc 8 Aug 2014 22:40:41 -0000 1.1.2.4 +++ rpm/rpmio/rpmjni.cc 24 Sep 2014 13:03:04 -0000 1.1.2.5 @@ -1,7 +1,9 @@ #include "system.h" + +#include <rpmiotypes.h> +#include <argv.h> #include <rpmlog.h> #include <rpmmacro.h> -#include <argv.h> #if defined(WITH_JNIEMBED) #include <jni.h> @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmlog.h ============================================================================ $ cvs diff -u -r2.24.4.1 -r2.24.4.2 rpmlog.h --- rpm/rpmio/rpmlog.h 13 Jul 2013 22:53:01 -0000 2.24.4.1 +++ rpm/rpmio/rpmlog.h 24 Sep 2014 13:03:04 -0000 2.24.4.2 @@ -196,6 +196,7 @@ */ /*@observer@*/ const char * rpmlogLevelPrefix(rpmlogLvl pri) + RPM_GNUC_PURE /*@*/; /** @@ -223,6 +224,7 @@ * @return number of messages */ int rpmlogGetNrecs(void) + RPM_GNUC_PURE /*@*/; /** @@ -232,6 +234,7 @@ */ /*@observer@*/ /*@retexpose@*/ /*@null@*/ const char * rpmlogRecMessage(/*@null@*/ rpmlogRec rec) + RPM_GNUC_PURE /*@*/; /** @@ -240,6 +243,7 @@ * @return log priority */ rpmlogLvl rpmlogRecPriority(/*@null@*/ rpmlogRec rec) + RPM_GNUC_PURE /*@*/; /** @@ -328,6 +332,7 @@ * @return code from last message */ int rpmlogCode(void) + RPM_GNUC_PURE /*@*/; /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmltc.c ============================================================================ $ cvs diff -u -r1.2.4.11 -r1.2.4.12 rpmltc.c --- rpm/rpmio/rpmltc.c 17 Sep 2014 03:36:21 -0000 1.2.4.11 +++ rpm/rpmio/rpmltc.c 24 Sep 2014 13:03:04 -0000 1.2.4.12 @@ -3,9 +3,9 @@ */ #include "system.h" -#include <rpmlog.h> #include <rpmiotypes.h> +#include <rpmlog.h> #define _RPMPGP_INTERNAL #if defined(WITH_TOMCRYPT) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmlua.h ============================================================================ $ cvs diff -u -r2.18.4.2 -r2.18.4.3 rpmlua.h --- rpm/rpmio/rpmlua.h 18 Sep 2014 05:07:02 -0000 2.18.4.2 +++ rpm/rpmio/rpmlua.h 24 Sep 2014 13:03:04 -0000 2.18.4.3 @@ -69,6 +69,7 @@ /*@-exportlocal@*/ /*@only@*/ /*@exposed@*/ /*@relnull@*/ rpmlua rpmluaGetGlobalState(void) + RPM_GNUC_PURE /*@*/; rpmlua rpmluaNew(void) @@ -169,8 +170,10 @@ double rpmluavGetValueNum(rpmluav var) /*@*/; int rpmluavKeyIsNum(rpmluav var) + RPM_GNUC_PURE /*@*/; int rpmluavValueIsNum(rpmluav var) + RPM_GNUC_PURE /*@*/; #ifdef __cplusplus @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmmalloc.c ============================================================================ $ cvs diff -u -r1.29.2.3 -r1.29.2.4 rpmmalloc.c --- rpm/rpmio/rpmmalloc.c 23 Sep 2014 18:32:12 -0000 1.29.2.3 +++ rpm/rpmio/rpmmalloc.c 24 Sep 2014 13:03:04 -0000 1.29.2.4 @@ -30,9 +30,11 @@ fprintf(stderr, _("memory alloc (%u bytes) returned NULL.\n"), (unsigned)size); exit(EXIT_FAILURE); /*@notreached@*/ +#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) /*@-nullret@*/ return NULL; /*@=nullret@*/ +#endif } /*@=modfilesys@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmmrb.c ============================================================================ $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmmrb.c --- rpm/rpmio/rpmmrb.c 17 Aug 2014 14:28:26 -0000 1.1.2.2 +++ rpm/rpmio/rpmmrb.c 24 Sep 2014 13:03:04 -0000 1.1.2.3 @@ -1,4 +1,6 @@ #include "system.h" + +#include <rpmiotypes.h> #include <argv.h> #if defined(WITH_MRBEMBED) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmnss.c ============================================================================ $ cvs diff -u -r1.40.2.16 -r1.40.2.17 rpmnss.c --- rpm/rpmio/rpmnss.c 17 Sep 2014 03:36:21 -0000 1.40.2.16 +++ rpm/rpmio/rpmnss.c 24 Sep 2014 13:03:04 -0000 1.40.2.17 @@ -3,9 +3,10 @@ */ #include "system.h" -#include <rpmlog.h> #include <rpmiotypes.h> +#include <rpmlog.h> + #define _RPMPGP_INTERNAL #if defined(WITH_NSS) #define _RPMNSS_INTERNAL @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmperl.c ============================================================================ $ cvs diff -u -r2.12.2.2 -r2.12.2.3 rpmperl.c --- rpm/rpmio/rpmperl.c 15 Apr 2012 21:20:53 -0000 2.12.2.2 +++ rpm/rpmio/rpmperl.c 24 Sep 2014 13:03:04 -0000 2.12.2.3 @@ -1,5 +1,6 @@ #include "system.h" +#include <rpmiotypes.h> #include <argv.h> #undef _ /* XXX everyone gotta be different */ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmpgp.h ============================================================================ $ cvs diff -u -r2.108.2.13 -r2.108.2.14 rpmpgp.h --- rpm/rpmio/rpmpgp.h 17 Sep 2014 03:36:21 -0000 2.108.2.13 +++ rpm/rpmio/rpmpgp.h 24 Sep 2014 13:03:04 -0000 2.108.2.14 @@ -1157,7 +1157,9 @@ * @param val byte value to lookup * @return string */ -/*@unused@*/ static inline /*@observer@*/ +/*@unused@*/ +RPM_GNUC_PURE +static inline /*@observer@*/ const char * pgpValStr(pgpValTbl vs, rpmuint8_t val) /*@*/ { @@ -1168,28 +1170,36 @@ return vs->str; } -/*@unused@*/ static inline /*@observer@*/ +/*@unused@*/ +RPM_GNUC_PURE +static inline /*@observer@*/ const char * _pgpTag2Name(uint32_t tag) /*@*/ { return pgpValStr(pgpTagTbl, (rpmuint8_t)tag); } -/*@unused@*/ static inline /*@observer@*/ +/*@unused@*/ +RPM_GNUC_PURE +static inline /*@observer@*/ const char * _pgpSigType2Name(uint32_t sigtype) /*@*/ { return pgpValStr(pgpSigTypeTbl, (rpmuint8_t)sigtype); } -/*@unused@*/ static inline /*@observer@*/ +/*@unused@*/ +RPM_GNUC_PURE +static inline /*@observer@*/ const char * _pgpHashAlgo2Name(uint32_t algo) /*@*/ { return pgpValStr(pgpHashTbl, (rpmuint8_t)algo); } -/*@unused@*/ static inline /*@observer@*/ +/*@unused@*/ +RPM_GNUC_PURE +static inline /*@observer@*/ const char * _pgpPubkeyAlgo2Name(uint32_t algo) /*@*/ { @@ -1202,7 +1212,9 @@ * @param str string to lookup * @return byte (or 0 on failure) */ -/*@unused@*/ static inline /*@observer@*/ +/*@unused@*/ +RPM_GNUC_PURE +static inline /*@observer@*/ rpmuint8_t pgpStrVal(pgpValTbl vs, const char * str) /*@*/ { @@ -1220,7 +1232,9 @@ * @param se end-of-string address * @return byte value */ -/*@unused@*/ static inline +/*@unused@*/ +RPM_GNUC_PURE +static inline int pgpValTok(pgpValTbl vs, const char * s, const char * se) /*@*/ { @@ -1434,6 +1448,7 @@ * @return PGPHASHALGO_<name> or -1 in case of error */ pgpHashAlgo pgpHashAlgoStringToNumber(const char *name, size_t name_len) + RPM_GNUC_PURE /*@*/; /** @@ -1495,12 +1510,16 @@ /*@modifies dig @*/; const char * pgpHashAlgo2Name(uint32_t algo) + RPM_GNUC_PURE /*@*/; const char * pgpPubkeyAlgo2Name(uint32_t algo) + RPM_GNUC_PURE /*@*/; rpmuint8_t pgpHashName2Algo(const char * name) + RPM_GNUC_PURE /*@*/; rpmuint8_t pgpPubkeyName2Algo(const char * name) + RPM_GNUC_PURE /*@*/; int pgpDigSetAlgos(pgpDig dig) /*@*/; @@ -1533,6 +1552,7 @@ * @return signature tag */ rpmuint32_t pgpGetSigtag(const pgpDig dig) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ -1541,6 +1561,7 @@ * @return signature tag type */ rpmuint32_t pgpGetSigtype(const pgpDig dig) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ -1550,6 +1571,7 @@ */ /*@observer@*/ /*@null@*/ extern const void * pgpGetSig(const pgpDig dig) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ -1558,6 +1580,7 @@ * @return signature tag data length */ rpmuint32_t pgpGetSiglen(const pgpDig dig) + RPM_GNUC_PURE /*@*/; /** \ingroup rpmpgp @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmruby.c ============================================================================ $ cvs diff -u -r2.16.2.2 -r2.16.2.3 rpmruby.c --- rpm/rpmio/rpmruby.c 8 Jul 2013 22:21:40 -0000 2.16.2.2 +++ rpm/rpmio/rpmruby.c 24 Sep 2014 13:03:04 -0000 2.16.2.3 @@ -1,4 +1,6 @@ #include "system.h" + +#include <rpmiotypes.h> #include <argv.h> #if defined(WITH_RUBYEMBED) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsq.c ============================================================================ $ cvs diff -u -r1.42.6.4 -r1.42.6.5 rpmsq.c --- rpm/rpmio/rpmsq.c 3 Sep 2014 19:28:55 -0000 1.42.6.4 +++ rpm/rpmio/rpmsq.c 24 Sep 2014 13:03:04 -0000 1.42.6.5 @@ -124,6 +124,8 @@ #include <sys/wait.h> #include <search.h> +#include <rpmiotypes.h> + /* portability fallback for sighold(3) */ #if !defined(HAVE_SIGHOLD) && defined(HAVE_SIGPROCMASK) && defined(HAVE_SIGADDSET) static int __RPM_sighold(int sig) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsql.c ============================================================================ $ cvs diff -u -r2.59.2.11 -r2.59.2.12 rpmsql.c --- rpm/rpmio/rpmsql.c 23 Sep 2014 18:35:42 -0000 2.59.2.11 +++ rpm/rpmio/rpmsql.c 24 Sep 2014 13:03:04 -0000 2.59.2.12 @@ -1903,6 +1903,7 @@ * @param s input string * @return trimmed string */ +RPM_GNUC_PURE static const char * ltrim(const char *s) { while (*s == ' ') @@ -3001,6 +3002,7 @@ * lower 30 bits of a 32-bit signed integer. * @param z */ +RPM_GNUC_PURE static int strlen30(const char *z) { const char *z2 = z; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmssl.c ============================================================================ $ cvs diff -u -r2.42.2.14 -r2.42.2.15 rpmssl.c --- rpm/rpmio/rpmssl.c 17 Sep 2014 03:36:21 -0000 2.42.2.14 +++ rpm/rpmio/rpmssl.c 24 Sep 2014 13:03:04 -0000 2.42.2.15 @@ -3,9 +3,10 @@ */ #include "system.h" -#include <rpmlog.h> #include <rpmiotypes.h> +#include <rpmlog.h> + #define _RPMPGP_INTERNAL #if defined(WITH_SSL) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsw.h ============================================================================ $ cvs diff -u -r2.12.4.1 -r2.12.4.2 rpmsw.h --- rpm/rpmio/rpmsw.h 12 Jul 2013 21:40:49 -0000 2.12.4.1 +++ rpm/rpmio/rpmsw.h 24 Sep 2014 13:03:04 -0000 2.12.4.2 @@ -93,6 +93,7 @@ */ /*@-exportlocal@*/ rpmtime_t rpmswDiff(/*@null@*/ rpmsw end, /*@null@*/ rpmsw begin) + RPM_GNUC_PURE /*@*/; /*@=exportlocal@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmtcl.c ============================================================================ $ cvs diff -u -r2.13.2.1 -r2.13.2.2 rpmtcl.c --- rpm/rpmio/rpmtcl.c 15 Apr 2012 21:20:53 -0000 2.13.2.1 +++ rpm/rpmio/rpmtcl.c 24 Sep 2014 13:03:04 -0000 2.13.2.2 @@ -1,5 +1,6 @@ #include "system.h" +#include <rpmiotypes.h> #include <argv.h> #ifdef WITH_TCL @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmurl.h ============================================================================ $ cvs diff -u -r1.41.4.6 -r1.41.4.7 rpmurl.h --- rpm/rpmio/rpmurl.h 15 Sep 2014 07:54:25 -0000 1.41.4.6 +++ rpm/rpmio/rpmurl.h 24 Sep 2014 13:03:04 -0000 1.41.4.7 @@ -227,8 +227,10 @@ * @return type of url */ urltype urlIsURL(const char * url) + RPM_GNUC_PURE /*@*/; urltype urlType(void * _u) + RPM_GNUC_PURE /*@*/; /** @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmuuid.c ============================================================================ $ cvs diff -u -r2.5.10.1 -r2.5.10.2 rpmuuid.c --- rpm/rpmio/rpmuuid.c 26 Mar 2011 13:03:53 -0000 2.5.10.1 +++ rpm/rpmio/rpmuuid.c 24 Sep 2014 13:03:04 -0000 2.5.10.2 @@ -13,8 +13,11 @@ #include "system.h" #include <string.h> + +#include <rpmiotypes.h> #include "rpmlog.h" #include "rpmuuid.h" + #ifdef WITH_UUID #include "uuid.h" #endif @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/set.c ============================================================================ $ cvs diff -u -r1.1.2.10 -r1.1.2.11 set.c --- rpm/rpmio/set.c 22 Sep 2014 18:24:27 -0000 1.1.2.10 +++ rpm/rpmio/set.c 24 Sep 2014 13:03:04 -0000 1.1.2.11 @@ -278,6 +278,7 @@ } /* Calculate Mshift paramter for encoding. */ +RPM_GNUC_PURE static int encode_golomb_Mshift(int c, int bpp) { @@ -853,7 +854,7 @@ * It encodes a (sorted) set of (non-negative) integer values, as follows: * integers are delta-encoded, golomb-compressed and base62-serialized. */ - +RPM_GNUC_PURE static int encode_set_size(int c, int bpp) { @@ -1360,6 +1361,7 @@ } /* Jenkins' one-at-a-time hash */ + RPM_GNUC_PURE static unsigned int hash(const char *str) { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/url.c ============================================================================ $ cvs diff -u -r1.73.4.10 -r1.73.4.11 url.c --- rpm/rpmio/url.c 16 Sep 2014 18:27:51 -0000 1.73.4.10 +++ rpm/rpmio/url.c 24 Sep 2014 13:03:04 -0000 1.73.4.11 @@ -6,9 +6,10 @@ #include <netinet/in.h> +#include <rpmio_internal.h> #include <rpmmacro.h> #include <rpmcb.h> -#include <rpmio_internal.h> + #ifdef WITH_NEON #include <rpmdav.h> #endif @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/xzdio.c ============================================================================ $ cvs diff -u -r1.14.4.1 -r1.14.4.2 xzdio.c --- rpm/rpmio/xzdio.c 15 Apr 2012 21:20:53 -0000 1.14.4.1 +++ rpm/rpmio/xzdio.c 24 Sep 2014 13:03:04 -0000 1.14.4.2 @@ -262,6 +262,7 @@ /* =============================================================== */ +RPM_GNUC_PURE static inline /*@dependent@*/ /*@null@*/ void * xzdFileno(FD_t fd) /*@*/ { @@ -426,6 +427,7 @@ return rc; } +RPM_GNUC_PURE static int xzdSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, /*@unused@*/ int whence) /*@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/yarn.h ============================================================================ $ cvs diff -u -r2.4.2.2 -r2.4.2.3 yarn.h --- rpm/rpmio/yarn.h 16 Apr 2012 03:21:22 -0000 2.4.2.2 +++ rpm/rpmio/yarn.h 24 Sep 2014 13:03:04 -0000 2.4.2.3 @@ -171,6 +171,7 @@ /*@globals fileSystem, internalState @*/ /*@modifies bolt, fileSystem, internalState @*/; long yarnPeekLock(yarnLock bolt) + RPM_GNUC_PURE /*@*/; /*@only@*/ /*@null@*/ yarnLock yarnFreeLock(/*@only@*/ yarnLock bolt) @@ . patch -p0 <<'@@ .' Index: rpm/system.h ============================================================================ $ cvs diff -u -r2.129.2.10 -r2.129.2.11 system.h --- rpm/system.h 4 Sep 2013 15:32:32 -0000 2.129.2.10 +++ rpm/system.h 24 Sep 2014 13:03:02 -0000 2.129.2.11 @@ -424,6 +424,9 @@ /** */ /*@unused@*/ /*@exits@*/ /*@only@*/ void * vmefail(size_t size) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) + __attribute__((__noreturn__)) +#endif /*@*/; /* XXX limit the fiddle up to linux for now. */ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org