mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +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
@@ -114,12 +114,12 @@ static CaptureResult dxgi_releaseFrame();
|
||||
|
||||
// implementation
|
||||
|
||||
static const char * dxgi_getName()
|
||||
static const char * dxgi_getName(void)
|
||||
{
|
||||
return "DXGI";
|
||||
}
|
||||
|
||||
static void dxgi_initOptions()
|
||||
static void dxgi_initOptions(void)
|
||||
{
|
||||
struct Option options[] =
|
||||
{
|
||||
@@ -186,7 +186,7 @@ static bool dxgi_create(CaptureGetPointerBuffer getPointerBufferFn, CapturePostP
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool dxgi_init()
|
||||
static bool dxgi_init(void)
|
||||
{
|
||||
assert(this);
|
||||
|
||||
@@ -572,12 +572,12 @@ fail:
|
||||
return false;
|
||||
}
|
||||
|
||||
static void dxgi_stop()
|
||||
static void dxgi_stop(void)
|
||||
{
|
||||
this->stop = true;
|
||||
}
|
||||
|
||||
static bool dxgi_deinit()
|
||||
static bool dxgi_deinit(void)
|
||||
{
|
||||
assert(this);
|
||||
|
||||
@@ -653,7 +653,7 @@ static bool dxgi_deinit()
|
||||
return true;
|
||||
}
|
||||
|
||||
static void dxgi_free()
|
||||
static void dxgi_free(void)
|
||||
{
|
||||
assert(this);
|
||||
|
||||
@@ -666,7 +666,7 @@ static void dxgi_free()
|
||||
this = NULL;
|
||||
}
|
||||
|
||||
static unsigned int dxgi_getMaxFrameSize()
|
||||
static unsigned int dxgi_getMaxFrameSize(void)
|
||||
{
|
||||
assert(this);
|
||||
assert(this->initialized);
|
||||
@@ -674,7 +674,7 @@ static unsigned int dxgi_getMaxFrameSize()
|
||||
return this->height * this->pitch;
|
||||
}
|
||||
|
||||
static unsigned int dxgi_getMouseScale()
|
||||
static unsigned int dxgi_getMouseScale(void)
|
||||
{
|
||||
assert(this);
|
||||
assert(this->initialized);
|
||||
@@ -701,7 +701,7 @@ static CaptureResult dxgi_hResultToCaptureResult(const HRESULT status)
|
||||
}
|
||||
}
|
||||
|
||||
static CaptureResult dxgi_capture()
|
||||
static CaptureResult dxgi_capture(void)
|
||||
{
|
||||
assert(this);
|
||||
assert(this->initialized);
|
||||
@@ -950,7 +950,7 @@ static CaptureResult dxgi_getFrame(FrameBuffer * frame)
|
||||
return CAPTURE_RESULT_OK;
|
||||
}
|
||||
|
||||
static CaptureResult dxgi_releaseFrame()
|
||||
static CaptureResult dxgi_releaseFrame(void)
|
||||
{
|
||||
assert(this);
|
||||
if (!this->needsRelease)
|
||||
|
@@ -89,12 +89,12 @@ static void on_mouseMove(int x, int y)
|
||||
lgSignalEvent(this->cursorEvents[0]);
|
||||
}
|
||||
|
||||
static const char * nvfbc_getName()
|
||||
static const char * nvfbc_getName(void)
|
||||
{
|
||||
return "NVFBC (NVidia Frame Buffer Capture)";
|
||||
};
|
||||
|
||||
static void nvfbc_initOptions()
|
||||
static void nvfbc_initOptions(void)
|
||||
{
|
||||
struct Option options[] =
|
||||
{
|
||||
@@ -163,7 +163,7 @@ static bool nvfbc_create(
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool nvfbc_init()
|
||||
static bool nvfbc_init(void)
|
||||
{
|
||||
this->stop = false;
|
||||
getDesktopSize(&this->width, &this->height, &this->dpi);
|
||||
@@ -205,7 +205,7 @@ static bool nvfbc_init()
|
||||
return true;
|
||||
}
|
||||
|
||||
static void nvfbc_stop()
|
||||
static void nvfbc_stop(void)
|
||||
{
|
||||
this->stop = true;
|
||||
lgSignalEvent(this->cursorEvents[0]);
|
||||
@@ -218,7 +218,7 @@ static void nvfbc_stop()
|
||||
}
|
||||
}
|
||||
|
||||
static bool nvfbc_deinit()
|
||||
static bool nvfbc_deinit(void)
|
||||
{
|
||||
mouseHook_remove();
|
||||
|
||||
@@ -231,7 +231,7 @@ static bool nvfbc_deinit()
|
||||
return true;
|
||||
}
|
||||
|
||||
static void nvfbc_free()
|
||||
static void nvfbc_free(void)
|
||||
{
|
||||
NvFBCToSysRelease(&this->nvfbc);
|
||||
|
||||
@@ -243,17 +243,17 @@ static void nvfbc_free()
|
||||
NvFBCFree();
|
||||
}
|
||||
|
||||
static unsigned int nvfbc_getMaxFrameSize()
|
||||
static unsigned int nvfbc_getMaxFrameSize(void)
|
||||
{
|
||||
return this->maxWidth * this->maxHeight * 4;
|
||||
}
|
||||
|
||||
static unsigned int nvfbc_getMouseScale()
|
||||
static unsigned int nvfbc_getMouseScale(void)
|
||||
{
|
||||
return this->dpi * 100 / DPI_100_PERCENT;
|
||||
}
|
||||
|
||||
static CaptureResult nvfbc_capture()
|
||||
static CaptureResult nvfbc_capture(void)
|
||||
{
|
||||
getDesktopSize(&this->width, &this->height, &this->dpi);
|
||||
NvFBCFrameGrabInfo grabInfo;
|
||||
|
Reference in New Issue
Block a user