mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[all] use explicit void parameter lists
This makes it a compile-time error to call a function that semantically takes no parameters with a nonzero number of arguments. Previously, such code would still compile, but risk blowing up the stack if a compiler chose to use something other than caller-cleanup calling conventions.
This commit is contained in:

committed by
Geoffrey McRae

parent
dc17492750
commit
a46a3a2668
@@ -54,7 +54,7 @@ struct crash
|
||||
|
||||
static struct crash crash = {0};
|
||||
|
||||
static void load_symbols()
|
||||
static void load_symbols(void)
|
||||
{
|
||||
bfd_init();
|
||||
crash.fd = bfd_openr(crash.exe, NULL);
|
||||
@@ -131,7 +131,7 @@ static bool lookup_address(bfd_vma pc, const char ** filename, const char ** fun
|
||||
return true;
|
||||
}
|
||||
|
||||
static void cleanup()
|
||||
static void cleanup(void)
|
||||
{
|
||||
if (crash.syms)
|
||||
free(crash.syms);
|
||||
|
@@ -82,7 +82,7 @@ static StringList ivshmemDeviceGetValues(struct Option * option)
|
||||
return sl;
|
||||
}
|
||||
|
||||
void ivshmemOptionsInit()
|
||||
void ivshmemOptionsInit(void)
|
||||
{
|
||||
struct Option options[] =
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include <unistd.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
int sysinfo_gfx_max_multisample()
|
||||
int sysinfo_gfx_max_multisample(void)
|
||||
{
|
||||
Display * dpy = XOpenDisplay(NULL);
|
||||
if (!dpy)
|
||||
@@ -64,7 +64,7 @@ int sysinfo_gfx_max_multisample()
|
||||
return maxSamples;
|
||||
}
|
||||
|
||||
long sysinfo_getPageSize()
|
||||
long sysinfo_getPageSize(void)
|
||||
{
|
||||
return sysconf(_SC_PAGESIZE);
|
||||
}
|
@@ -33,7 +33,7 @@ struct IVSHMEMInfo
|
||||
HANDLE handle;
|
||||
};
|
||||
|
||||
void ivshmemOptionsInit()
|
||||
void ivshmemOptionsInit(void)
|
||||
{
|
||||
static struct Option options[] = {
|
||||
{
|
||||
|
@@ -19,13 +19,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
int sysinfo_gfx_max_multisample()
|
||||
int sysinfo_gfx_max_multisample(void)
|
||||
{
|
||||
//FIXME: Implement this
|
||||
return 4;
|
||||
}
|
||||
|
||||
long sysinfo_getPageSize()
|
||||
long sysinfo_getPageSize(void)
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
|
@@ -58,7 +58,7 @@ inline static BOOL CompareWindowsVersion(DWORD dwMajorVersion, DWORD dwMinorVers
|
||||
return VerifyVersionInfo(&ver, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask);
|
||||
}
|
||||
|
||||
bool IsWindows8()
|
||||
bool IsWindows8(void)
|
||||
{
|
||||
return
|
||||
(CompareWindowsVersion(6, 3) == TRUE) ||
|
||||
|
Reference in New Issue
Block a user