From 1ce9e4cfc1b4bb48c209ee23e5454efdcb9ef234 Mon Sep 17 00:00:00 2001 From: Nicholas Bastin Date: Thu, 17 Jun 2004 18:27:18 +0000 Subject: [PATCH] Fixed end-of-loop code not reached warning when using SunPro C --- Modules/_sre.c | 4 ++++ Modules/collectionsmodule.c | 4 ++++ Objects/listobject.c | 4 ++++ Objects/setobject.c | 4 ++++ Objects/unicodeobject.c | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/Modules/_sre.c b/Modules/_sre.c index 4be33d04ca8..6ee0bb82d3b 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -34,6 +34,10 @@ * other compatibility work. */ +#ifdef __SUNPRO_C +#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED) +#endif + #ifndef SRE_RECURSIVE static char copyright[] = diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c index 62b43aa90e4..4026ea50efd 100644 --- a/Modules/collectionsmodule.c +++ b/Modules/collectionsmodule.c @@ -1,6 +1,10 @@ #include "Python.h" #include "structmember.h" +#ifdef __SUNPRO_C +#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED) +#endif + /* collections module implementation of a deque() datatype Written and maintained by Raymond D. Hettinger Copyright (c) 2004 Python Software Foundation. diff --git a/Objects/listobject.c b/Objects/listobject.c index ac8cd335a4e..4385e4b01fd 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -2,6 +2,10 @@ #include "Python.h" +#ifdef __SUNPRO_C +#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED) +#endif + #ifdef STDC_HEADERS #include #else diff --git a/Objects/setobject.c b/Objects/setobject.c index 289d5d3d964..e94f9204007 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -10,6 +10,10 @@ All rights reserved. */ +#ifdef __SUNPRO_C +#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED) +#endif + static PyObject * set_update(PySetObject *so, PyObject *other) { diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 0858525584b..cf730e5626d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -41,6 +41,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "unicodeobject.h" #include "ucnhash.h" +#ifdef __SUNPRO_C +#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED) +#endif + #ifdef MS_WINDOWS #include #endif