File python-opengl-2.0.1.09-gccwarnings.patch of Package python-opengl

--- src/interface/GL.ARB.texture_compression.0103.inc
+++ src/interface/GL.ARB.texture_compression.0103.inc
@@ -1008,7 +1008,7 @@
         else
         {
             str = PyObject_Str(obj7);
-            PyString_AsStringAndSize(str, (char**)&arg9, &len);
+            PyString_AsStringAndSize(str, &arg9, &len);
             Py_DECREF(str);
         }
     }
@@ -1055,7 +1055,7 @@
         else
         {
             str = PyObject_Str(obj6);
-            PyString_AsStringAndSize(str, (char**)&arg8, &len);
+            PyString_AsStringAndSize(str, &arg8, &len);
             Py_DECREF(str);
         }
     }
@@ -1101,7 +1101,7 @@
         else
         {
             str = PyObject_Str(obj5);
-            PyString_AsStringAndSize(str, (char**)&arg7, &len);
+            PyString_AsStringAndSize(str, &arg7, &len);
             Py_DECREF(str);
         }
     }
@@ -1151,7 +1151,7 @@
         else
         {
             str = PyObject_Str(obj9);
-            PyString_AsStringAndSize(str, (char**)&arg11, &len);
+            PyString_AsStringAndSize(str, &arg11, &len);
             Py_DECREF(str);
         }
     }
@@ -1199,7 +1199,7 @@
         else
         {
             str = PyObject_Str(obj7);
-            PyString_AsStringAndSize(str, (char**)&arg9, &len);
+            PyString_AsStringAndSize(str, &arg9, &len);
             Py_DECREF(str);
         }
     }
@@ -1242,7 +1242,7 @@
         else
         {
             str = PyObject_Str(obj5);
-            PyString_AsStringAndSize(str, (char**)&arg7, &len);
+            PyString_AsStringAndSize(str, &arg7, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GL.EXT.color_table.0120.inc
+++ src/interface/GL.EXT.color_table.0120.inc
@@ -1046,7 +1046,7 @@
         else
         {
             str = PyObject_Str(obj5);
-            PyString_AsStringAndSize(str, (char**)&arg6, &len);
+            PyString_AsStringAndSize(str, &arg6, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GL.EXT.draw_range_elements.0100.inc
+++ src/interface/GL.EXT.draw_range_elements.0100.inc
@@ -958,7 +958,7 @@
         else
         {
             str = PyObject_Str(obj5);
-            PyString_AsStringAndSize(str, (char**)&arg6, &len);
+            PyString_AsStringAndSize(str, &arg6, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GL.EXT.subtexture.0111.inc
+++ src/interface/GL.EXT.subtexture.0111.inc
@@ -1006,7 +1006,7 @@
         else
         {
             str = PyObject_Str(obj6);
-            PyString_AsStringAndSize(str, (char**)&arg7, &len);
+            PyString_AsStringAndSize(str, &arg7, &len);
             Py_DECREF(str);
         }
     }
@@ -1346,7 +1346,7 @@
         else
         {
             str = PyObject_Str(obj8);
-            PyString_AsStringAndSize(str, (char**)&arg9, &len);
+            PyString_AsStringAndSize(str, &arg9, &len);
             Py_DECREF(str);
         }
     }
@@ -1737,7 +1737,7 @@
         else
         {
             str = PyObject_Str(obj10);
-            PyString_AsStringAndSize(str, (char**)&arg11, &len);
+            PyString_AsStringAndSize(str, &arg11, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GL.EXT.texture3D.0116.inc
+++ src/interface/GL.EXT.texture3D.0116.inc
@@ -976,7 +976,7 @@
         else
         {
             str = PyObject_Str(obj9);
-            PyString_AsStringAndSize(str, (char**)&arg10, &len);
+            PyString_AsStringAndSize(str, &arg10, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GL.GL__init___.0101.inc
+++ src/interface/GL.GL__init___.0101.inc
@@ -954,7 +954,10 @@
 	
 	for (i = 0; i < PointerTypeCount; i++) if (PointerTypes[i] == type) return;
 	
-	PointerTypes = (PointerTypes) ? PyMem_Resize(PointerTypes, GLenum, ++PointerTypeCount) : PyMem_New(GLenum, PointerTypeCount = 1);
+    if (PointerTypes)
+        PyMem_Resize(PointerTypes, GLenum, ++PointerTypeCount);
+    else
+        PointerTypes = PyMem_New(GLenum, PointerTypeCount = 1);
 	
 	PointerTypes[PointerTypeCount-1] = type;
 }
@@ -989,7 +992,10 @@
 		int i;
 		PointerLock *lock;
 
-		PointerLocks = (PointerLocks) ? PyMem_Resize(PointerLocks, PointerLock, ++PointerLockCount) : PyMem_New(PointerLock, PointerLockCount = 1);
+        if (PointerLocks) 
+            PyMem_Resize(PointerLocks, PointerLock, ++PointerLockCount);
+        else
+            PointerLocks = PyMem_New(PointerLock, PointerLockCount = 1);
 		lock = PointerLocks + PointerLockCount - 1;
 		(*lock).pointers[0] = pointer;
 		(*lock).ref_count = 1;
@@ -1013,7 +1019,11 @@
 		int i;
 		PointerLock *lock;
 
-		PointerLocks = (PointerLocks) ? PyMem_Resize(PointerLocks, PointerLock, ++PointerLockCount) : PyMem_New(PointerLock, PointerLockCount = 1);
+        if (PointerLocks)
+            PyMem_Resize(PointerLocks, PointerLock, ++PointerLockCount);
+        else
+            PointerLocks = PyMem_New(PointerLock, PointerLockCount = 1);
+
 		lock = PointerLocks + PointerLockCount - 1;
 		(*lock).pointers[0] = pointer;
 		(*lock).ref_count = 0;
@@ -2157,7 +2167,7 @@
 	
 	/* Get the buffer type and color mode so we can calculate the length of a vertex */
 #ifdef GL_VERSION_1_1
-	glGetPointerv(GL_FEEDBACK_BUFFER_POINTER, (void**)&result->buffer);
+	glGetPointerv(GL_FEEDBACK_BUFFER_POINTER, &result->buffer);
 	glGetIntegerv(GL_FEEDBACK_BUFFER_TYPE, (GLint*)&type);
 #else
 	PyGLcontext *context = GetGLcontext();
@@ -2222,7 +2232,7 @@
 			len += 2*result->vertex_len;
 			break;
 		case GL_POLYGON_TOKEN:
-			len += (int)result->buffer[len++]*result->vertex_len;
+			len += (int)result->buffer[len]*result->vertex_len + 1;
 			break;
 		case GL_PASS_THROUGH_TOKEN:
 			len++;
@@ -2326,7 +2336,7 @@
 	PySelectBuffer *result = PyObject_NEW(PySelectBuffer, &PySelectBuffer_Type);
 	
 #ifdef GL_VERSION_1_1
-	glGetPointerv(GL_SELECTION_BUFFER_POINTER, (void**)&result->buffer);
+	glGetPointerv(GL_SELECTION_BUFFER_POINTER, &result->buffer);
 #else
 	PyGLcontext *context = GetGLcontext();
 	result->buffer = context->selection_buffer;
@@ -6788,7 +6798,7 @@
         else
         {
             str = PyObject_Str(obj3);
-            PyString_AsStringAndSize(str, (char**)&arg4, &len);
+            PyString_AsStringAndSize(str, &arg4, &len);
             Py_DECREF(str);
         }
     }
@@ -6935,7 +6945,7 @@
         else
         {
             str = PyObject_Str(obj4);
-            PyString_AsStringAndSize(str, (char**)&arg5, &len);
+            PyString_AsStringAndSize(str, &arg5, &len);
             Py_DECREF(str);
         }
     }
@@ -10059,7 +10069,7 @@
         else
         {
             str = PyObject_Str(obj0);
-            PyString_AsStringAndSize(str, (char**)&arg1, &len);
+            PyString_AsStringAndSize(str, &arg1, &len);
             Py_DECREF(str);
         }
     }
@@ -12091,7 +12101,7 @@
         else
         {
             str = PyObject_Str(obj7);
-            PyString_AsStringAndSize(str, (char**)&arg8, &len);
+            PyString_AsStringAndSize(str, &arg8, &len);
             Py_DECREF(str);
         }
     }
@@ -12438,7 +12448,7 @@
         else
         {
             str = PyObject_Str(obj8);
-            PyString_AsStringAndSize(str, (char**)&arg9, &len);
+            PyString_AsStringAndSize(str, &arg9, &len);
             Py_DECREF(str);
         }
     }
@@ -12939,7 +12949,7 @@
         else
         {
             str = PyObject_Str(obj6);
-            PyString_AsStringAndSize(str, (char**)&arg7, &len);
+            PyString_AsStringAndSize(str, &arg7, &len);
             Py_DECREF(str);
         }
     }
@@ -13279,7 +13289,7 @@
         else
         {
             str = PyObject_Str(obj8);
-            PyString_AsStringAndSize(str, (char**)&arg9, &len);
+            PyString_AsStringAndSize(str, &arg9, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GL.SGI.color_table.0120.inc
+++ src/interface/GL.SGI.color_table.0120.inc
@@ -1046,7 +1046,7 @@
         else
         {
             str = PyObject_Str(obj5);
-            PyString_AsStringAndSize(str, (char**)&arg6, &len);
+            PyString_AsStringAndSize(str, &arg6, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GL.SGIS.texture4D.0119.inc
+++ src/interface/GL.SGIS.texture4D.0119.inc
@@ -1023,7 +1023,7 @@
         else
         {
             str = PyObject_Str(obj10);
-            PyString_AsStringAndSize(str, (char**)&arg11, &len);
+            PyString_AsStringAndSize(str, &arg11, &len);
             Py_DECREF(str);
         }
     }
@@ -1500,7 +1500,7 @@
         else
         {
             str = PyObject_Str(obj12);
-            PyString_AsStringAndSize(str, (char**)&arg13, &len);
+            PyString_AsStringAndSize(str, &arg13, &len);
             Py_DECREF(str);
         }
     }
--- src/interface/GLU.EXT.nurbs_tessellator.0103.inc
+++ src/interface/GLU.EXT.nurbs_tessellator.0103.inc
@@ -925,7 +925,7 @@
     PyObject * obj1  = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:__gluNurbsCallbackDataEXT",&obj0,&obj1)) return NULL;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_GLUnurbs,1)) == -1) return NULL;
+    if ((SWIG_ConvertPtr(obj0, &arg1, SWIGTYPE_p_GLUnurbs,1)) == -1) return NULL;
     {
         arg2 = obj1;
     }
--- src/interface/GLU.GLU__init___.0103.inc
+++ src/interface/GLU.GLU__init___.0103.inc
@@ -2915,7 +2915,7 @@
         else
         {
             str = PyObject_Str(obj5);
-            PyString_AsStringAndSize(str, (char**)&arg6, &len);
+            PyString_AsStringAndSize(str, &arg6, &len);
             Py_DECREF(str);
         }
     }
@@ -3270,7 +3270,7 @@
         else
         {
             str = PyObject_Str(obj6);
-            PyString_AsStringAndSize(str, (char**)&arg7, &len);
+            PyString_AsStringAndSize(str, &arg7, &len);
             Py_DECREF(str);
         }
     }
@@ -3668,7 +3668,7 @@
         else
         {
             str = PyObject_Str(obj7);
-            PyString_AsStringAndSize(str, (char**)&arg8, &len);
+            PyString_AsStringAndSize(str, &arg8, &len);
             Py_DECREF(str);
         }
     }
@@ -4109,7 +4109,7 @@
         else
         {
             str = PyObject_Str(obj8);
-            PyString_AsStringAndSize(str, (char**)&arg9, &len);
+            PyString_AsStringAndSize(str, &arg9, &len);
             Py_DECREF(str);
         }
     }
@@ -4488,7 +4488,7 @@
         else
         {
             str = PyObject_Str(obj9);
-            PyString_AsStringAndSize(str, (char**)&arg10, &len);
+            PyString_AsStringAndSize(str, &arg10, &len);
             Py_DECREF(str);
         }
     }
@@ -4910,7 +4910,7 @@
         else
         {
             str = PyObject_Str(obj10);
-            PyString_AsStringAndSize(str, (char**)&arg11, &len);
+            PyString_AsStringAndSize(str, &arg11, &len);
             Py_DECREF(str);
         }
     }