Skip to content

Commit

Permalink
warnings fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpux authored and lazka committed Jul 19, 2023
1 parent 850deab commit 7d8565e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Modules/_winapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ getattributelist(PyObject *obj, const char *name, AttributeList *attribute_list)
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;

Expand Down
6 changes: 3 additions & 3 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -5490,7 +5490,7 @@ os_utime_impl(PyObject *module, path_t *path, PyObject *times, PyObject *ns,
/*[clinic end generated code: output=cfcac69d027b82cf input=2fbd62a2f228f8f4]*/
{
#ifdef MS_WINDOWS
HANDLE hFile;
HANDLE hFile = 0;
FILETIME atime, mtime;
#else
int result;
Expand Down Expand Up @@ -14705,7 +14705,7 @@ os__add_dll_directory_impl(PyObject *module, path_t *path)
loaded. */
Py_BEGIN_ALLOW_THREADS
if (!(hKernel32 = GetModuleHandleW(L"kernel32")) ||
!(AddDllDirectory = (PAddDllDirectory)GetProcAddress(
!(AddDllDirectory = (PAddDllDirectory)(void *)GetProcAddress(
hKernel32, "AddDllDirectory")) ||
!(cookie = (*AddDllDirectory)(path->wide))) {
err = GetLastError();
Expand Down Expand Up @@ -14755,7 +14755,7 @@ os__remove_dll_directory_impl(PyObject *module, PyObject *cookie)
loaded. */
Py_BEGIN_ALLOW_THREADS
if (!(hKernel32 = GetModuleHandleW(L"kernel32")) ||
!(RemoveDllDirectory = (PRemoveDllDirectory)GetProcAddress(
!(RemoveDllDirectory = (PRemoveDllDirectory)(void *)GetProcAddress(
hKernel32, "RemoveDllDirectory")) ||
!(*RemoveDllDirectory)(cookieValue)) {
err = GetLastError();
Expand Down
2 changes: 2 additions & 0 deletions Modules/socketmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ struct SOCKADDR_BTH_REDEF {
*/
# 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
Expand Down
2 changes: 1 addition & 1 deletion PC/python_exe.rc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// current versions of Windows.
1 RT_MANIFEST "python.manifest"

1 ICON DISCARDABLE "icons\python.ico"
1 ICON DISCARDABLE "icons/python.ico"


/////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion PC/pythonw_exe.rc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// current versions of Windows.
1 RT_MANIFEST "python.manifest"

1 ICON DISCARDABLE "icons\pythonw.ico"
1 ICON DISCARDABLE "icons/pythonw.ico"


/////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions PC/winreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
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);
Expand Down
3 changes: 2 additions & 1 deletion Python/thread_nt.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,9 @@ PyThread_release_lock(PyThread_type_lock aLock)
{
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 */
Expand Down

0 comments on commit 7d8565e

Please sign in to comment.