From: Fred Drake <fdrake@acm.org>
Date: Thu, 19 Jul 2001 20:48:32 +0000 (+0000)
Subject: Remove warnings from the SGI compiler.
X-Git-Tag: v2.2a3~1040
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0368bc44e82b422aa1e6ddca57cba8754103b465;p=python

Remove warnings from the SGI compiler.
This is part of SF patch #434992.
---

diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 0360994c34..dfa1012c29 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -114,9 +114,8 @@ char *PyCursesVersion = "2.1";
     curses module in other ways.  So the code will just specify 
     explicit prototypes here. */
 extern int setupterm(char *,int,int *);
-#ifdef sgi
-extern char *tigetstr(char *);
-extern char *tparm(char *instring, ...);
+#ifdef __sgi
+#include <term.h>
 #endif
 
 #if defined(sgi) || defined(__sun__)
@@ -721,7 +720,7 @@ PyCursesWindow_GetCh(PyCursesWindowObject *self, PyObject *args)
     PyErr_SetString(PyExc_TypeError, "getch requires 0 or 2 arguments");
     return NULL;
   }
-  return PyInt_FromLong(rtn);
+  return PyInt_FromLong((long)rtn);
 }
 
 static PyObject *
@@ -1305,7 +1304,6 @@ PyCursesWindow_Scroll(PyCursesWindowObject *self, PyObject *args)
   switch(ARG_COUNT(args)) {
   case 0:
     return PyCursesCheckERR(scroll(self->win), "scroll");
-    break;
   case 1:
     if (!PyArg_Parse(args, "i;nlines", &nlines))
       return NULL;
@@ -1325,7 +1323,6 @@ PyCursesWindow_TouchLine(PyCursesWindowObject *self, PyObject *args)
     if (!PyArg_Parse(args,"(ii);start,count",&st,&cnt))
       return NULL;
     return PyCursesCheckERR(touchline(self->win,st,cnt), "touchline");
-    break;
   case 3:
     if (!PyArg_Parse(args, "(iii);start,count,val", &st, &cnt, &val))
       return NULL;
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index f17b95af04..8ff353f04b 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1215,7 +1215,7 @@ posix_umask(PyObject *self, PyObject *args)
 	int i;
 	if (!PyArg_ParseTuple(args, "i:umask", &i))
 		return NULL;
-	i = umask(i);
+	i = (int)umask(i);
 	if (i < 0)
 		return posix_error();
 	return PyInt_FromLong((long)i);