diff --git a/SOURCES/compat-db-cppcheck-warnings.patch b/SOURCES/compat-db-cppcheck-warnings.patch new file mode 100644 index 0000000..04a36bd --- /dev/null +++ b/SOURCES/compat-db-cppcheck-warnings.patch @@ -0,0 +1,26 @@ +# Sanity fix for cppcheck warnings + +diff -up compat-db-4.7.25/db-4.7.25/qam/qam_stat.c.old compat-db-4.7.25/db-4.7.25/qam/qam_stat.c +--- compat-db-4.7.25/db-4.7.25/qam/qam_stat.c.old 2014-03-26 11:39:14.653022479 +0100 ++++ compat-db-4.7.25/db-4.7.25/qam/qam_stat.c 2014-03-26 11:40:09.981228567 +0100 +@@ -36,7 +36,7 @@ __qam_stat(dbc, spp, flags) + QAMDATA *qp, *ep; + QMETA *meta; + QUEUE *t; +- db_indx_t indx; ++ db_indx_t indx = 0; + db_pgno_t first, last, pgno, pg_ext, stop; + u_int32_t re_len; + int ret, t_ret; +diff -up compat-db-4.7.25/db-4.7.25/repmgr/repmgr_posix.c.old compat-db-4.7.25/db-4.7.25/repmgr/repmgr_posix.c +--- compat-db-4.7.25/db-4.7.25/repmgr/repmgr_posix.c.old 2014-03-26 11:36:30.164404044 +0100 ++++ compat-db-4.7.25/db-4.7.25/repmgr/repmgr_posix.c 2014-03-26 11:36:39.083437596 +0100 +@@ -534,7 +534,7 @@ __repmgr_select_loop(env) + struct timeval select_timeout, *select_timeout_p; + DB_REP *db_rep; + REPMGR_CONNECTION *conn, *next; +- db_timespec timeout; ++ db_timespec timeout = {.tv_sec = 0, .tv_nsec = 0}; + fd_set reads, writes; + int ret, flow_control, maxfd; + u_int8_t buf[10]; /* arbitrary size */ diff --git a/SPECS/compat-db.spec b/SPECS/compat-db.spec index d01537f..07deed7 100644 --- a/SPECS/compat-db.spec +++ b/SPECS/compat-db.spec @@ -8,13 +8,14 @@ Summary: The Berkeley DB database compatibility library Name: compat-db Version: %{main_version} -Release: 27%{?dist} +Release: 28%{?dist} Source0: http://download.oracle.com/berkeley-db/db-%{db47_version}.tar.gz # license text extracted from tarball Source1: LICENSE Patch3: db-4.5.20-sparc64.patch Patch5: db-4.6.21-1.85-compat.patch +Patch6: compat-db-cppcheck-warnings.patch # Upstream db-4.7.25 patches Patch50: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db47_version}/patch.4.7.25.1 @@ -74,6 +75,7 @@ pushd db-%{db47_version} %patch53 -p1 -b .java-api %patch3 -p1 -b .sparc64 %patch5 -p1 -b .compat +%patch6 -p2 -b .cppcheck-warn popd mkdir docs @@ -184,6 +186,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/db%{db47_version} %changelog +* Tue Aug 19 2014 Jan Stanek - 4.7.25-28 +- Sanity patch for cppcheck detected defects + * Fri Jan 24 2014 Daniel Mach - 4.7.25-27 - Mass rebuild 2014-01-24