mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-10-31 15:57:31 +03:00 
			
		
		
		
	Windows MSVC: Fix data loss compiler warnings
Fixed MSVC compiler warnings where it was indicating a conversion from a larger data type to smaller data type might have data loss.
This commit is contained in:
		
							parent
							
								
									6f0dfe6d2d
								
							
						
					
					
						commit
						631883f62f
					
				|  | @ -124,10 +124,11 @@ static PyObject * | |||
| psyco_lobj_read(lobjectObject *self, PyObject *args) | ||||
| { | ||||
|     PyObject *res; | ||||
|     int where, end, size = -1; | ||||
|     int where, end; | ||||
|     Py_ssize_t size = -1; | ||||
|     char *buffer; | ||||
| 
 | ||||
|     if (!PyArg_ParseTuple(args, "|i", &size)) return NULL; | ||||
|     if (!PyArg_ParseTuple(args, "|" CONV_CODE_PY_SSIZE_T,  &size)) return NULL; | ||||
| 
 | ||||
|     EXC_IF_LOBJ_CLOSED(self); | ||||
|     EXC_IF_LOBJ_LEVEL0(self); | ||||
|  |  | |||
|  | @ -100,7 +100,8 @@ static int | |||
| xid_init(XidObject *self, PyObject *args, PyObject *kwargs) | ||||
| { | ||||
|     static char *kwlist[] = {"format_id", "gtrid", "bqual", NULL}; | ||||
|     int format_id, i, gtrid_len, bqual_len; | ||||
|     int format_id; | ||||
|     size_t i, gtrid_len, bqual_len; | ||||
|     const char *gtrid, *bqual; | ||||
|     PyObject *tmp; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user