mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	fix compiler warnings
This commit is contained in:
		
							parent
							
								
									30134f53fc
								
							
						
					
					
						commit
						ccc51c1fc6
					
				
					 1 changed files with 9 additions and 3 deletions
				
			
		| 
						 | 
					@ -369,6 +369,12 @@ _PyUnicode_CheckConsistency(void *op)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return 1;
 | 
					    return 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					static int
 | 
				
			||||||
 | 
					_PyUnicode_CheckConsistency(void *op)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* --- Bloom Filters ----------------------------------------------------- */
 | 
					/* --- Bloom Filters ----------------------------------------------------- */
 | 
				
			||||||
| 
						 | 
					@ -536,7 +542,7 @@ resize_inplace(PyUnicodeObject *unicode, Py_ssize_t length)
 | 
				
			||||||
        _PyUnicode_LENGTH(unicode) = length;
 | 
					        _PyUnicode_LENGTH(unicode) = length;
 | 
				
			||||||
        PyUnicode_WRITE(PyUnicode_KIND(unicode), data, length, 0);
 | 
					        PyUnicode_WRITE(PyUnicode_KIND(unicode), data, length, 0);
 | 
				
			||||||
        if (share_wstr || _PyUnicode_WSTR(unicode) == NULL) {
 | 
					        if (share_wstr || _PyUnicode_WSTR(unicode) == NULL) {
 | 
				
			||||||
            _PyUnicode_CHECK(unicode);
 | 
					            _PyUnicode_CheckConsistency(unicode);
 | 
				
			||||||
            return 0;
 | 
					            return 0;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -556,7 +562,7 @@ resize_inplace(PyUnicodeObject *unicode, Py_ssize_t length)
 | 
				
			||||||
    _PyUnicode_WSTR(unicode) = wstr;
 | 
					    _PyUnicode_WSTR(unicode) = wstr;
 | 
				
			||||||
    _PyUnicode_WSTR(unicode)[length] = 0;
 | 
					    _PyUnicode_WSTR(unicode)[length] = 0;
 | 
				
			||||||
    _PyUnicode_WSTR_LENGTH(unicode) = length;
 | 
					    _PyUnicode_WSTR_LENGTH(unicode) = length;
 | 
				
			||||||
    _PyUnicode_CHECK(unicode);
 | 
					    _PyUnicode_CheckConsistency(unicode);
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1354,7 +1360,7 @@ unicode_resize(PyObject **p_unicode, Py_ssize_t length)
 | 
				
			||||||
        *p_unicode = resize_compact(unicode, length);
 | 
					        *p_unicode = resize_compact(unicode, length);
 | 
				
			||||||
        if (*p_unicode == NULL)
 | 
					        if (*p_unicode == NULL)
 | 
				
			||||||
            return -1;
 | 
					            return -1;
 | 
				
			||||||
        _PyUnicode_CHECK(*p_unicode);
 | 
					        _PyUnicode_CheckConsistency(*p_unicode);
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
    } else
 | 
					    } else
 | 
				
			||||||
        return resize_inplace((PyUnicodeObject*)unicode, length);
 | 
					        return resize_inplace((PyUnicodeObject*)unicode, length);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue