Skip to content

Commit b1b8320

Browse files
Alexpuxlazka
authored andcommitted
warnings fixes
1 parent 94f97dd commit b1b8320

File tree

7 files changed

+11
-7
lines changed

7 files changed

+11
-7
lines changed

Modules/_winapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ getattributelist(PyObject *obj, const char *name, AttributeList *attribute_list)
971971
DWORD err;
972972
BOOL result;
973973
PyObject *value;
974-
Py_ssize_t handle_list_size;
974+
Py_ssize_t handle_list_size = 0;
975975
DWORD attribute_count = 0;
976976
SIZE_T attribute_list_size = 0;
977977

Modules/posixmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5492,7 +5492,7 @@ os_utime_impl(PyObject *module, path_t *path, PyObject *times, PyObject *ns,
54925492
/*[clinic end generated code: output=cfcac69d027b82cf input=2fbd62a2f228f8f4]*/
54935493
{
54945494
#ifdef MS_WINDOWS
5495-
HANDLE hFile;
5495+
HANDLE hFile = 0;
54965496
FILETIME atime, mtime;
54975497
#else
54985498
int result;
@@ -14716,7 +14716,7 @@ os__add_dll_directory_impl(PyObject *module, path_t *path)
1471614716
loaded. */
1471714717
Py_BEGIN_ALLOW_THREADS
1471814718
if (!(hKernel32 = GetModuleHandleW(L"kernel32")) ||
14719-
!(AddDllDirectory = (PAddDllDirectory)GetProcAddress(
14719+
!(AddDllDirectory = (PAddDllDirectory)(void *)GetProcAddress(
1472014720
hKernel32, "AddDllDirectory")) ||
1472114721
!(cookie = (*AddDllDirectory)(path->wide))) {
1472214722
err = GetLastError();
@@ -14766,7 +14766,7 @@ os__remove_dll_directory_impl(PyObject *module, PyObject *cookie)
1476614766
loaded. */
1476714767
Py_BEGIN_ALLOW_THREADS
1476814768
if (!(hKernel32 = GetModuleHandleW(L"kernel32")) ||
14769-
!(RemoveDllDirectory = (PRemoveDllDirectory)GetProcAddress(
14769+
!(RemoveDllDirectory = (PRemoveDllDirectory)(void *)GetProcAddress(
1477014770
hKernel32, "RemoveDllDirectory")) ||
1477114771
!(*RemoveDllDirectory)(cookieValue)) {
1477214772
err = GetLastError();

Modules/socketmodule.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ struct SOCKADDR_BTH_REDEF {
6868
*/
6969
# ifdef SIO_GET_MULTICAST_FILTER
7070
# include <mstcpip.h> /* for SIO_RCVALL */
71+
#ifndef __MINGW32__ /* resolve by configure */
7172
# define HAVE_ADDRINFO
7273
# define HAVE_SOCKADDR_STORAGE
74+
#endif
7375
# define HAVE_GETADDRINFO
7476
# define HAVE_GETNAMEINFO
7577
# define ENABLE_IPV6

PC/python_exe.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// current versions of Windows.
1313
1 RT_MANIFEST "python.manifest"
1414

15-
1 ICON DISCARDABLE "icons\python.ico"
15+
1 ICON DISCARDABLE "icons/python.ico"
1616

1717

1818
/////////////////////////////////////////////////////////////////////////////

PC/pythonw_exe.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// current versions of Windows.
1313
1 RT_MANIFEST "python.manifest"
1414

15-
1 ICON DISCARDABLE "icons\pythonw.ico"
15+
1 ICON DISCARDABLE "icons/pythonw.ico"
1616

1717

1818
/////////////////////////////////////////////////////////////////////////////

PC/winreg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
825825
case REG_BINARY:
826826
/* ALSO handle ALL unknown data types here. Even if we can't
827827
support it natively, we should handle the bits. */
828+
/* fallthrough */
828829
default:
829830
if (retDataSize == 0) {
830831
Py_INCREF(Py_None);

Python/thread_nt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ PyThread_release_lock(PyThread_type_lock aLock)
360360
{
361361
dprintf(("%lu: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
362362

363-
if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock)))
363+
if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock))) {
364364
dprintf(("%lu: Could not PyThread_release_lock(%p) error: %ld\n", PyThread_get_thread_ident(), aLock, GetLastError()));
365+
}
365366
}
366367

367368
/* minimum/maximum thread stack sizes supported */

0 commit comments

Comments
 (0)