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

Skip to content

Commit 0368bc4

Browse files
committed
Remove warnings from the SGI compiler.
This is part of SF patch #434992.
1 parent 78bdb9b commit 0368bc4

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

Modules/_cursesmodule.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ char *PyCursesVersion = "2.1";
114114
curses module in other ways. So the code will just specify
115115
explicit prototypes here. */
116116
extern int setupterm(char *,int,int *);
117-
#ifdef sgi
118-
extern char *tigetstr(char *);
119-
extern char *tparm(char *instring, ...);
117+
#ifdef __sgi
118+
#include <term.h>
120119
#endif
121120

122121
#if defined(sgi) || defined(__sun__)
@@ -721,7 +720,7 @@ PyCursesWindow_GetCh(PyCursesWindowObject *self, PyObject *args)
721720
PyErr_SetString(PyExc_TypeError, "getch requires 0 or 2 arguments");
722721
return NULL;
723722
}
724-
return PyInt_FromLong(rtn);
723+
return PyInt_FromLong((long)rtn);
725724
}
726725

727726
static PyObject *
@@ -1305,7 +1304,6 @@ PyCursesWindow_Scroll(PyCursesWindowObject *self, PyObject *args)
13051304
switch(ARG_COUNT(args)) {
13061305
case 0:
13071306
return PyCursesCheckERR(scroll(self->win), "scroll");
1308-
break;
13091307
case 1:
13101308
if (!PyArg_Parse(args, "i;nlines", &nlines))
13111309
return NULL;
@@ -1325,7 +1323,6 @@ PyCursesWindow_TouchLine(PyCursesWindowObject *self, PyObject *args)
13251323
if (!PyArg_Parse(args,"(ii);start,count",&st,&cnt))
13261324
return NULL;
13271325
return PyCursesCheckERR(touchline(self->win,st,cnt), "touchline");
1328-
break;
13291326
case 3:
13301327
if (!PyArg_Parse(args, "(iii);start,count,val", &st, &cnt, &val))
13311328
return NULL;

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ posix_umask(PyObject *self, PyObject *args)
12151215
int i;
12161216
if (!PyArg_ParseTuple(args, "i:umask", &i))
12171217
return NULL;
1218-
i = umask(i);
1218+
i = (int)umask(i);
12191219
if (i < 0)
12201220
return posix_error();
12211221
return PyInt_FromLong((long)i);

0 commit comments

Comments
 (0)