mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 10:14:04 +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
@@ -31,7 +31,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
typedef struct LGTimer LGTimer;
|
||||
|
||||
static inline uint64_t microtime()
|
||||
static inline uint64_t microtime(void)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
static LARGE_INTEGER freq = { 0 };
|
||||
@@ -50,7 +50,7 @@ static inline uint64_t microtime()
|
||||
|
||||
#if !defined(_WIN32)
|
||||
//FIXME: make win32 versions
|
||||
static inline uint64_t nanotime()
|
||||
static inline uint64_t nanotime(void)
|
||||
{
|
||||
struct timespec time;
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &time);
|
||||
|
@@ -210,7 +210,7 @@ bool option_register(struct Option options[])
|
||||
return true;
|
||||
};
|
||||
|
||||
void option_free()
|
||||
void option_free(void)
|
||||
{
|
||||
for(int i = 0; i < state.oCount; ++i)
|
||||
{
|
||||
@@ -520,7 +520,7 @@ exit:
|
||||
return result;
|
||||
}
|
||||
|
||||
bool option_validate()
|
||||
bool option_validate(void)
|
||||
{
|
||||
if (state.doHelp)
|
||||
{
|
||||
@@ -571,7 +571,7 @@ bool option_validate()
|
||||
return ok;
|
||||
}
|
||||
|
||||
void option_print()
|
||||
void option_print(void)
|
||||
{
|
||||
printf(
|
||||
"The following is a complete list of options accepted by this application\n\n"
|
||||
|
@@ -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