mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-30 23:47:27 +03:00 
			
		
		
		
	Merge pull request #7050 from radarhere/warning
Fixed compilation warnings
This commit is contained in:
		
						commit
						b4419169a4
					
				|  | @ -502,12 +502,9 @@ getink(PyObject *color, Imaging im, char *ink) { | |||
|        be cast to either UINT8 or INT32 */ | ||||
| 
 | ||||
|     int rIsInt = 0; | ||||
|     int tupleSize; | ||||
|     if (PyTuple_Check(color)) { | ||||
|         tupleSize = PyTuple_GET_SIZE(color); | ||||
|         if (tupleSize == 1) { | ||||
|             color = PyTuple_GetItem(color, 0); | ||||
|         } | ||||
|     int tupleSize = PyTuple_Check(color) ? PyTuple_GET_SIZE(color) : -1; | ||||
|     if (tupleSize == 1) { | ||||
|         color = PyTuple_GetItem(color, 0); | ||||
|     } | ||||
|     if (im->type == IMAGING_TYPE_UINT8 || im->type == IMAGING_TYPE_INT32 || | ||||
|         im->type == IMAGING_TYPE_SPECIAL) { | ||||
|  | @ -521,7 +518,7 @@ getink(PyObject *color, Imaging im, char *ink) { | |||
|             PyErr_SetString( | ||||
|                 PyExc_TypeError, "color must be int or single-element tuple"); | ||||
|             return NULL; | ||||
|         } else if (!PyTuple_Check(color)) { | ||||
|         } else if (tupleSize == -1) { | ||||
|             PyErr_SetString(PyExc_TypeError, "color must be int or tuple"); | ||||
|             return NULL; | ||||
|         } | ||||
|  |  | |||
|  | @ -341,7 +341,10 @@ splitlists( | |||
| 
 | ||||
|     PixelList *l, *r, *c, *n; | ||||
|     int i; | ||||
|     int nRight, nLeft; | ||||
|     int nRight; | ||||
| #ifndef NO_OUTPUT | ||||
|     int nLeft; | ||||
| #endif | ||||
|     int splitColourVal; | ||||
| 
 | ||||
| #ifdef TEST_SPLIT | ||||
|  | @ -396,12 +399,17 @@ splitlists( | |||
|     } | ||||
| #endif | ||||
|     nCount[0] = nCount[1] = 0; | ||||
|     nLeft = nRight = 0; | ||||
|     nRight = 0; | ||||
| #ifndef NO_OUTPUT | ||||
|     nLeft = 0; | ||||
| #endif | ||||
|     for (left = 0, c = h[axis]; c;) { | ||||
|         left = left + c->count; | ||||
|         nCount[0] += c->count; | ||||
|         c->flag = 0; | ||||
| #ifndef NO_OUTPUT | ||||
|         nLeft++; | ||||
| #endif | ||||
|         c = c->next[axis]; | ||||
|         if (left * 2 > pixelCount) { | ||||
|             break; | ||||
|  | @ -414,7 +422,9 @@ splitlists( | |||
|                 break; | ||||
|             } | ||||
|             c->flag = 0; | ||||
| #ifndef NO_OUTPUT | ||||
|             nLeft++; | ||||
| #endif | ||||
|             nCount[0] += c->count; | ||||
|         } | ||||
|     } | ||||
|  | @ -430,7 +440,9 @@ splitlists( | |||
|             } | ||||
|             c->flag = 1; | ||||
|             nRight++; | ||||
| #ifndef NO_OUTPUT | ||||
|             nLeft--; | ||||
| #endif | ||||
|             nCount[0] -= c->count; | ||||
|             nCount[1] += c->count; | ||||
|         } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user