Files
MINGW-packages/mingw-w64-python3/2000-warnings-fixes.patch
2019-04-16 08:44:55 +03:00

88 lines
3.5 KiB
Diff

diff -Naur Python-3.7.0-orig/Modules/_winapi.c Python-3.7.0/Modules/_winapi.c
--- Python-3.7.0-orig/Modules/_winapi.c 2018-07-12 10:21:22.900756300 +0300
+++ Python-3.7.0/Modules/_winapi.c 2018-07-12 10:23:03.286932600 +0300
@@ -886,7 +886,7 @@
DWORD err;
BOOL result;
PyObject *value;
- Py_ssize_t handle_list_size;
+ Py_ssize_t handle_list_size = 0;
DWORD attribute_count = 0;
SIZE_T attribute_list_size = 0;
diff -Naur Python-3.7.0-orig/Modules/posixmodule.c Python-3.7.0/Modules/posixmodule.c
--- Python-3.7.0-orig/Modules/posixmodule.c 2018-07-12 10:22:50.526110200 +0300
+++ Python-3.7.0/Modules/posixmodule.c 2018-07-12 10:23:03.286932600 +0300
@@ -4646,7 +4646,7 @@
/*[clinic end generated code: output=cfcac69d027b82cf input=081cdc54ca685385]*/
{
#ifdef MS_WINDOWS
- HANDLE hFile;
+ HANDLE hFile = 0;
FILETIME atime, mtime;
#else
int result;
diff -Naur Python-3.7.0-orig/Modules/socketmodule.h Python-3.7.0/Modules/socketmodule.h
--- Python-3.7.0-orig/Modules/socketmodule.h 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Modules/socketmodule.h 2018-07-12 10:23:03.302532700 +0300
@@ -29,8 +29,10 @@
*/
# ifdef SIO_GET_MULTICAST_FILTER
# include <mstcpip.h> /* for SIO_RCVALL */
+#ifndef __MINGW32__ /* resolve by configure */
# define HAVE_ADDRINFO
# define HAVE_SOCKADDR_STORAGE
+#endif
# define HAVE_GETADDRINFO
# define HAVE_GETNAMEINFO
# define ENABLE_IPV6
diff -Naur Python-3.7.0-orig/PC/python_exe.rc Python-3.7.0/PC/python_exe.rc
--- Python-3.7.0-orig/PC/python_exe.rc 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/PC/python_exe.rc 2018-07-12 10:23:03.302532700 +0300
@@ -7,7 +7,7 @@
#include <winuser.h>
1 RT_MANIFEST "python.manifest"
-1 ICON DISCARDABLE "icons\python.ico"
+1 ICON DISCARDABLE "icons/python.ico"
/////////////////////////////////////////////////////////////////////////////
diff -Naur Python-3.7.0-orig/PC/pythonw_exe.rc Python-3.7.0/PC/pythonw_exe.rc
--- Python-3.7.0-orig/PC/pythonw_exe.rc 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/PC/pythonw_exe.rc 2018-07-12 10:23:03.302532700 +0300
@@ -7,7 +7,7 @@
#include <winuser.h>
1 RT_MANIFEST "python.manifest"
-1 ICON DISCARDABLE "icons\pythonw.ico"
+1 ICON DISCARDABLE "icons/pythonw.ico"
/////////////////////////////////////////////////////////////////////////////
diff -Naur Python-3.7.0-orig/PC/winreg.c Python-3.7.0/PC/winreg.c
--- Python-3.7.0-orig/PC/winreg.c 2018-07-12 10:20:57.098311000 +0300
+++ Python-3.7.0/PC/winreg.c 2018-07-12 10:23:03.302532700 +0300
@@ -791,6 +791,7 @@
case REG_BINARY:
/* ALSO handle ALL unknown data types here. Even if we can't
support it natively, we should handle the bits. */
+ /* fallthrough */
default:
if (retDataSize == 0) {
Py_INCREF(Py_None);
diff -Naur Python-3.7.0-orig/Python/thread_nt.h Python-3.7.0/Python/thread_nt.h
--- Python-3.7.0-orig/Python/thread_nt.h 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Python/thread_nt.h 2018-07-12 10:23:03.302532700 +0300
@@ -318,8 +318,9 @@
{
dprintf(("%lu: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
- if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock)))
+ if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock))) {
dprintf(("%lu: Could not PyThread_release_lock(%p) error: %ld\n", PyThread_get_thread_ident(), aLock, GetLastError()));
+ }
}
/* minimum/maximum thread stack sizes supported */