Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ba301e

Browse files
committed
Moved SunPro warning suppression into pyport.h and out of individual
modules and objects.
1 parent 95b66f3 commit 9ba301e

7 files changed

Lines changed: 7 additions & 24 deletions

File tree

Include/pyport.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,4 +579,11 @@ typedef struct fd_set {
579579
#define Py_GCC_ATTRIBUTE(x) __attribute__(x)
580580
#endif
581581

582+
/* Eliminate end-of-loop code not reached warnings from SunPro C
583+
* when using do{...}while(0) macros
584+
*/
585+
#ifdef __SUNPRO_C
586+
#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)
587+
#endif
588+
582589
#endif /* Py_PYPORT_H */

Modules/_sre.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
* other compatibility work.
3535
*/
3636

37-
#ifdef __SUNPRO_C
38-
#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)
39-
#endif
40-
4137
#ifndef SRE_RECURSIVE
4238

4339
static char copyright[] =

Modules/collectionsmodule.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "Python.h"
22
#include "structmember.h"
33

4-
#ifdef __SUNPRO_C
5-
#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)
6-
#endif
7-
84
/* collections module implementation of a deque() datatype
95
Written and maintained by Raymond D. Hettinger <[email protected]>
106
Copyright (c) 2004 Python Software Foundation.

Objects/dictobject.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
#include "Python.h"
1111

12-
#ifdef __SUNPRO_C
13-
#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)
14-
#endif
15-
1612
typedef PyDictEntry dictentry;
1713
typedef PyDictObject dictobject;
1814

Objects/listobject.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
#include "Python.h"
44

5-
#ifdef __SUNPRO_C
6-
#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)
7-
#endif
8-
95
#ifdef STDC_HEADERS
106
#include <stddef.h>
117
#else

Objects/setobject.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
All rights reserved.
1111
*/
1212

13-
#ifdef __SUNPRO_C
14-
#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)
15-
#endif
16-
1713
static PyObject *
1814
set_update(PySetObject *so, PyObject *other)
1915
{

Objects/unicodeobject.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4141
#include "unicodeobject.h"
4242
#include "ucnhash.h"
4343

44-
#ifdef __SUNPRO_C
45-
#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)
46-
#endif
47-
4844
#ifdef MS_WINDOWS
4945
#include <windows.h>
5046
#endif

0 commit comments

Comments
 (0)