diff --git a/pgadmin3-nullthis.patch b/pgadmin3-nullthis.patch index e29635b..deb16c4 100644 --- a/pgadmin3-nullthis.patch +++ b/pgadmin3-nullthis.patch @@ -1,6 +1,53 @@ diff -up ./pgadmin/db/pgConn.cpp.nullthis ./pgadmin/db/pgConn.cpp --- ./pgadmin/db/pgConn.cpp.nullthis 2016-02-08 05:19:40.000000000 -0500 -+++ ./pgadmin/db/pgConn.cpp 2016-08-23 13:12:34.390480484 -0400 ++++ ./pgadmin/db/pgConn.cpp 2016-08-28 15:36:47.295256972 -0400 +@@ -406,22 +406,19 @@ wxString pgConn::GetSslModeName() + bool pgConn::GetIsEdb() + { + // to retrieve edb flag +- BackendMinimumVersion(0, 0); +- return isEdb; ++ return BackendMinimumVersion(0, 0) && isEdb; + } + + bool pgConn::GetIsGreenplum() + { + // to retrieve Greenplum flag +- BackendMinimumVersion(0, 0); +- return isGreenplum; ++ return BackendMinimumVersion(0, 0) && isGreenplum; + } + + bool pgConn::GetIsHawq() + { + // to retrieve Greenplum HAWQ flag +- BackendMinimumVersion(0, 0); +- return isHawq; ++ return BackendMinimumVersion(0, 0) && isHawq; + } + + wxString pgConn::SystemNamespaceRestriction(const wxString &nsp) +@@ -475,6 +472,9 @@ bool pgConn::IsSuperuser() + + bool pgConn::BackendMinimumVersion(int major, int minor) + { ++ if (GetStatus() != PGCONN_OK) ++ return false; ++ + if (!majorVersion) + { + wxString version = GetVersionString(); +@@ -503,8 +503,8 @@ bool pgConn::BackendMinimumVersion(int m + // releases are not coordinated with PostgreSQL minor releases. + bool pgConn::BackendMinimumVersion(int major, int minor, int patch) + { +- if (!majorVersion) +- BackendMinimumVersion(0, 0); ++ if (!BackendMinimumVersion(major, minor)) ++ return false; // false if non connected + + return majorVersion > major || (majorVersion == major && minorVersion > minor) || (majorVersion == major && minorVersion == minor && patchVersion >= patch); + } @@ -648,6 +648,11 @@ void pgConn::ExamineLibpqVersion() } } diff --git a/pgadmin3.spec b/pgadmin3.spec index 4a0f23c..4512b13 100644 --- a/pgadmin3.spec +++ b/pgadmin3.spec @@ -41,7 +41,7 @@ required to communicate with the database server. %build export LIBS="-lwx_gtk2u_core-2.8" -export CXXFLAGS="%optflags -fno-delete-null-pointer-checks" +export CXXFLAGS="%optflags -fno-delete-null-pointer-checks -Wno-unused-local-typedefs" %configure --disable-debug --disable-dependency-tracking --with-wx-version=2.8 --with-wx=%{_prefix} make %{?_smp_mflags} all @@ -87,10 +87,10 @@ rm -rf %{buildroot} %{_datadir}/applications/* %changelog -* Fri Jul 19 2016 Stuart Gathman 1.22.1-3 +* Tue Aug 23 2016 Stuart Gathman 1.22.1-3 - Fix a few of the null pointer problems, bz#1369520 -* Fri Jul 19 2016 Stuart Gathman 1.22.1-2 +* Tue Jul 19 2016 Stuart Gathman 1.22.1-2 - Compile with --no-delete-null-pointer-checks, bz#1335043 * Fri Jul 1 2016 Stuart Gathman 1.22.1-1.3