mirror of https://github.com/python/cpython
gh-103167: Fix `-Wstrict-prototypes` warnings by using `(void)` for functions with no args (GH-103168)
This commit is contained in:
parent
1a8f862e32
commit
119f67de08
|
@ -121,7 +121,7 @@ Copyright (C) 1994 Steen Lumholt.
|
||||||
#define WAIT_FOR_STDIN
|
#define WAIT_FOR_STDIN
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_get_tcl_lib_path()
|
_get_tcl_lib_path(void)
|
||||||
{
|
{
|
||||||
static PyObject *tcl_library_path = NULL;
|
static PyObject *tcl_library_path = NULL;
|
||||||
static int already_checked = 0;
|
static int already_checked = 0;
|
||||||
|
|
|
@ -8546,7 +8546,7 @@ os_setpgrp_impl(PyObject *module)
|
||||||
#include <processsnapshot.h>
|
#include <processsnapshot.h>
|
||||||
|
|
||||||
static PyObject*
|
static PyObject*
|
||||||
win32_getppid()
|
win32_getppid(void)
|
||||||
{
|
{
|
||||||
DWORD error;
|
DWORD error;
|
||||||
PyObject* result = NULL;
|
PyObject* result = NULL;
|
||||||
|
@ -13330,7 +13330,7 @@ static int has_ShellExecute = -1;
|
||||||
static HINSTANCE (CALLBACK *Py_ShellExecuteW)(HWND, LPCWSTR, LPCWSTR, LPCWSTR,
|
static HINSTANCE (CALLBACK *Py_ShellExecuteW)(HWND, LPCWSTR, LPCWSTR, LPCWSTR,
|
||||||
LPCWSTR, INT);
|
LPCWSTR, INT);
|
||||||
static int
|
static int
|
||||||
check_ShellExecute()
|
check_ShellExecute(void)
|
||||||
{
|
{
|
||||||
HINSTANCE hShell32;
|
HINSTANCE hShell32;
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ locate_pythons_for_key(HKEY root, REGSAM flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
locate_store_pythons()
|
locate_store_pythons(void)
|
||||||
{
|
{
|
||||||
#if defined(_M_X64)
|
#if defined(_M_X64)
|
||||||
/* 64bit process, so look in native registry */
|
/* 64bit process, so look in native registry */
|
||||||
|
@ -466,7 +466,7 @@ locate_store_pythons()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
locate_venv_python()
|
locate_venv_python(void)
|
||||||
{
|
{
|
||||||
static wchar_t venv_python[MAX_PATH];
|
static wchar_t venv_python[MAX_PATH];
|
||||||
INSTALLED_PYTHON * ip;
|
INSTALLED_PYTHON * ip;
|
||||||
|
@ -495,7 +495,7 @@ locate_venv_python()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
locate_all_pythons()
|
locate_all_pythons(void)
|
||||||
{
|
{
|
||||||
/* venv Python is highest priority */
|
/* venv Python is highest priority */
|
||||||
locate_venv_python();
|
locate_venv_python();
|
||||||
|
@ -694,7 +694,7 @@ static wchar_t wrapped_script_path[MAX_PATH];
|
||||||
* valid wrapped script file.
|
* valid wrapped script file.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
locate_wrapped_script()
|
locate_wrapped_script(void)
|
||||||
{
|
{
|
||||||
wchar_t * p;
|
wchar_t * p;
|
||||||
size_t plen;
|
size_t plen;
|
||||||
|
@ -1034,7 +1034,7 @@ read_config_file(wchar_t * config_path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void read_commands()
|
static void read_commands(void)
|
||||||
{
|
{
|
||||||
if (launcher_ini_path[0])
|
if (launcher_ini_path[0])
|
||||||
read_config_file(launcher_ini_path);
|
read_config_file(launcher_ini_path);
|
||||||
|
@ -1684,7 +1684,7 @@ wcsdup_pad(const wchar_t *s, int padding, int *newlen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static wchar_t *
|
static wchar_t *
|
||||||
get_process_name()
|
get_process_name(void)
|
||||||
{
|
{
|
||||||
DWORD bufferLen = MAX_PATH;
|
DWORD bufferLen = MAX_PATH;
|
||||||
DWORD len = bufferLen;
|
DWORD len = bufferLen;
|
||||||
|
|
|
@ -132,7 +132,7 @@ typedef BOOL (*PIsWow64Process2)(HANDLE, USHORT*, USHORT*);
|
||||||
|
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
_getNativeMachine()
|
_getNativeMachine(void)
|
||||||
{
|
{
|
||||||
static USHORT _nativeMachine = IMAGE_FILE_MACHINE_UNKNOWN;
|
static USHORT _nativeMachine = IMAGE_FILE_MACHINE_UNKNOWN;
|
||||||
if (_nativeMachine == IMAGE_FILE_MACHINE_UNKNOWN) {
|
if (_nativeMachine == IMAGE_FILE_MACHINE_UNKNOWN) {
|
||||||
|
@ -163,14 +163,14 @@ _getNativeMachine()
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
isAMD64Host()
|
isAMD64Host(void)
|
||||||
{
|
{
|
||||||
return _getNativeMachine() == IMAGE_FILE_MACHINE_AMD64;
|
return _getNativeMachine() == IMAGE_FILE_MACHINE_AMD64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
isARM64Host()
|
isARM64Host(void)
|
||||||
{
|
{
|
||||||
return _getNativeMachine() == IMAGE_FILE_MACHINE_ARM64;
|
return _getNativeMachine() == IMAGE_FILE_MACHINE_ARM64;
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,7 +467,7 @@ void _PyEval_SetSwitchInterval(unsigned long microseconds)
|
||||||
gil->interval = microseconds;
|
gil->interval = microseconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long _PyEval_GetSwitchInterval()
|
unsigned long _PyEval_GetSwitchInterval(void)
|
||||||
{
|
{
|
||||||
struct _gil_runtime_state *gil = &_PyRuntime.ceval.gil;
|
struct _gil_runtime_state *gil = &_PyRuntime.ceval.gil;
|
||||||
return gil->interval;
|
return gil->interval;
|
||||||
|
|
|
@ -2355,13 +2355,13 @@ config_usage(int error, const wchar_t* program)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
config_envvars_usage()
|
config_envvars_usage(void)
|
||||||
{
|
{
|
||||||
printf(usage_envvars, (wint_t)DELIM, (wint_t)DELIM, PYTHONHOMEHELP);
|
printf(usage_envvars, (wint_t)DELIM, (wint_t)DELIM, PYTHONHOMEHELP);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
config_xoptions_usage()
|
config_xoptions_usage(void)
|
||||||
{
|
{
|
||||||
puts(usage_xoptions);
|
puts(usage_xoptions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1488,7 +1488,7 @@ static PyStructSequence_Desc windows_version_desc = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_sys_getwindowsversion_from_kernel32()
|
_sys_getwindowsversion_from_kernel32(void)
|
||||||
{
|
{
|
||||||
#ifndef MS_WINDOWS_DESKTOP
|
#ifndef MS_WINDOWS_DESKTOP
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue