summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-12-26 19:08:48 +0000
committerBernard Normier <bernard@zeroc.com>2012-12-26 19:08:48 +0000
commitee483bab1e0d0e6acdb0310007757c00d10f64c2 (patch)
tree425ca084bce7c1b016c4a9f64e24a0e8cbc7542d /py
parentFixed (ICE-5035) - Added check to detect mingw compiler (diff)
downloadice-ee483bab1e0d0e6acdb0310007757c00d10f64c2.tar.bz2
ice-ee483bab1e0d0e6acdb0310007757c00d10f64c2.tar.xz
ice-ee483bab1e0d0e6acdb0310007757c00d10f64c2.zip
Fixed GCC warnings; added -Werror to GCC builds
Diffstat (limited to 'py')
-rw-r--r--py/config/Make.rules.Linux23
-rw-r--r--py/modules/IcePy/Connection.cpp2
-rw-r--r--py/modules/IcePy/Endpoint.cpp2
-rw-r--r--py/modules/IcePy/ImplicitContext.cpp2
-rw-r--r--py/modules/IcePy/Proxy.cpp2
5 files changed, 27 insertions, 4 deletions
diff --git a/py/config/Make.rules.Linux b/py/config/Make.rules.Linux
new file mode 100644
index 00000000000..969addd54a4
--- /dev/null
+++ b/py/config/Make.rules.Linux
@@ -0,0 +1,23 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+#
+# This file is itself included by Make.rules
+#
+
+include $(top_srcdir)/../cpp/config/Make.rules.$(UNAME)
+
+ifeq ($(CXX),g++)
+ ifeq ($(OPTIMIZE),yes)
+ #
+ # TODO: this is only need for Python < 3.x
+ #
+ CXXFLAGS += -fno-strict-aliasing
+ endif
+endif
diff --git a/py/modules/IcePy/Connection.cpp b/py/modules/IcePy/Connection.cpp
index 67e93114f85..1cb84c4271e 100644
--- a/py/modules/IcePy/Connection.cpp
+++ b/py/modules/IcePy/Connection.cpp
@@ -72,7 +72,7 @@ extern "C"
static PyObject*
connectionCompare(ConnectionObject* c1, PyObject* other, int op)
{
- bool result;
+ bool result = false;
if(PyObject_TypeCheck(other, &ConnectionType))
{
diff --git a/py/modules/IcePy/Endpoint.cpp b/py/modules/IcePy/Endpoint.cpp
index 314a163c5d1..8da02fe06bc 100644
--- a/py/modules/IcePy/Endpoint.cpp
+++ b/py/modules/IcePy/Endpoint.cpp
@@ -54,7 +54,7 @@ extern "C"
static PyObject*
endpointCompare(EndpointObject* p1, PyObject* other, int op)
{
- bool result;
+ bool result = false;
if(PyObject_TypeCheck(other, &EndpointType))
{
diff --git a/py/modules/IcePy/ImplicitContext.cpp b/py/modules/IcePy/ImplicitContext.cpp
index ae503a10e58..23fad405720 100644
--- a/py/modules/IcePy/ImplicitContext.cpp
+++ b/py/modules/IcePy/ImplicitContext.cpp
@@ -63,7 +63,7 @@ extern "C"
static PyObject*
implicitContextCompare(ImplicitContextObject* c1, PyObject* other, int op)
{
- bool result;
+ bool result = false;
if(PyObject_TypeCheck(other, &ImplicitContextType))
{
diff --git a/py/modules/IcePy/Proxy.cpp b/py/modules/IcePy/Proxy.cpp
index 9e462cfd550..36d0d642254 100644
--- a/py/modules/IcePy/Proxy.cpp
+++ b/py/modules/IcePy/Proxy.cpp
@@ -96,7 +96,7 @@ extern "C"
static PyObject*
proxyCompare(ProxyObject* p1, PyObject* other, int op)
{
- bool result;
+ bool result = false;
if(PyObject_TypeCheck(other, &ProxyType))
{