diff --git a/client/clipboards/Wayland/src/wayland.c b/client/clipboards/Wayland/src/wayland.c index b5035a1d..74c6a35b 100644 --- a/client/clipboards/Wayland/src/wayland.c +++ b/client/clipboards/Wayland/src/wayland.c @@ -171,7 +171,7 @@ static enum LG_ClipboardData mimetypeToCbType(const char * mimetype) return LG_CLIPBOARD_DATA_NONE; } -static const char * wayland_cb_getName() +static const char * wayland_cb_getName(void) { return "Wayland"; } @@ -327,7 +327,7 @@ static bool wayland_cb_init( return true; } -static void wayland_cb_free() +static void wayland_cb_free(void) { free(this); this = NULL; @@ -425,7 +425,7 @@ static void wayland_cb_notice(LG_ClipboardRequestFn requestFn, this->requestFn(wayland_cb_reply_fn, NULL); } -static void wayland_cb_release() +static void wayland_cb_release(void) { this->requestFn = NULL; } diff --git a/client/clipboards/X11/src/x11.c b/client/clipboards/X11/src/x11.c index 6c4bde6d..ae77950e 100644 --- a/client/clipboards/X11/src/x11.c +++ b/client/clipboards/X11/src/x11.c @@ -57,7 +57,7 @@ static const char * atomTypes[] = "image/jpeg" }; -static const char * x11_cb_getName() +static const char * x11_cb_getName(void) { return "X11"; } @@ -116,7 +116,7 @@ static bool x11_cb_init( return true; } -static void x11_cb_free() +static void x11_cb_free(void) { free(this); this = NULL; @@ -432,7 +432,7 @@ static void x11_cb_notice(LG_ClipboardRequestFn requestFn, LG_ClipboardData type XFlush(this->display); } -static void x11_cb_release() +static void x11_cb_release(void) { this->requestFn = NULL; XSetSelectionOwner(this->display, XA_PRIMARY , None, CurrentTime); diff --git a/client/fonts/SDL/src/sdl.c b/client/fonts/SDL/src/sdl.c index 9dbc7eba..5e80218d 100644 --- a/client/fonts/SDL/src/sdl.c +++ b/client/fonts/SDL/src/sdl.c @@ -150,4 +150,4 @@ struct LG_Font LGF_SDL = .destroy = lgf_sdl_destroy, .render = lgf_sdl_render, .release = lgf_sdl_release -}; \ No newline at end of file +}; diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index 5839bddd..127146fd 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -158,12 +158,12 @@ static struct Option egl_options[] = void update_mouse_shape(struct Inst * this); -const char * egl_get_name() +const char * egl_get_name(void) { return "EGL"; } -void egl_setup() +void egl_setup(void) { option_register(egl_options); } diff --git a/client/renderers/EGL/texture.c b/client/renderers/EGL/texture.c index 3d9819dc..0f18e758 100644 --- a/client/renderers/EGL/texture.c +++ b/client/renderers/EGL/texture.c @@ -268,7 +268,7 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_ return true; } -static void egl_warn_slow() +static void egl_warn_slow(void) { static bool warnDone = false; if (!warnDone) diff --git a/client/renderers/OpenGL/opengl.c b/client/renderers/OpenGL/opengl.c index ed1ff659..5041c7a9 100644 --- a/client/renderers/OpenGL/opengl.c +++ b/client/renderers/OpenGL/opengl.c @@ -196,12 +196,12 @@ static bool draw_frame(struct Inst * this); static void draw_mouse(struct Inst * this); static void render_wait(struct Inst * this); -const char * opengl_get_name() +const char * opengl_get_name(void) { return "OpenGL"; } -static void opengl_setup() +static void opengl_setup(void) { option_register(opengl_options); } diff --git a/client/src/config.c b/client/src/config.c index 7b14dbf6..7526f16a 100644 --- a/client/src/config.c +++ b/client/src/config.c @@ -396,7 +396,7 @@ static struct Option options[] = {0} }; -void config_init() +void config_init(void) { params.center = true; params.w = 1024; @@ -514,12 +514,12 @@ bool config_load(int argc, char * argv[]) return true; } -void config_free() +void config_free(void) { option_free(); } -static void doLicense() +static void doLicense(void) { fprintf(stderr, "\n" diff --git a/client/src/ll.c b/client/src/ll.c index 450b5a04..e78de4aa 100644 --- a/client/src/ll.c +++ b/client/src/ll.c @@ -38,7 +38,7 @@ struct ll LG_Lock lock; }; -struct ll * ll_new() +struct ll * ll_new(void) { struct ll * list = malloc(sizeof(struct ll)); list->head = NULL; diff --git a/client/src/main.c b/client/src/main.c index 518521d7..8561f87d 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -88,7 +88,7 @@ struct AppParams params = { 0 }; static void setGrab(bool enable); static void setGrabQuiet(bool enable); -static void lgInit() +static void lgInit(void) { g_state.state = APP_STATE_RUNNING; g_state.resizeDone = true; @@ -101,13 +101,13 @@ static void lgInit() g_cursor.guest.valid = false; } -static bool inputEnabled() +static bool inputEnabled(void) { return params.useSpiceInput && !g_state.ignoreInput && ((g_cursor.grab && params.captureInputOnly) || !params.captureInputOnly); } -static void alignToGuest() +static void alignToGuest(void) { if (SDL_HasEvent(e_SDLEvent)) return; @@ -120,7 +120,7 @@ static void alignToGuest() SDL_PushEvent(&event); } -static void updatePositionInfo() +static void updatePositionInfo(void) { if (g_state.haveSrcSize) { @@ -709,7 +709,7 @@ static SpiceDataType clipboard_type_to_spice_type(const LG_ClipboardData type) } } -void clipboardRelease() +void clipboardRelease(void) { if (!params.clipboardToVM) return; @@ -814,7 +814,7 @@ void spiceClipboardData(const SpiceDataType type, uint8_t * buffer, uint32_t siz } } -void spiceClipboardRelease() +void spiceClipboardRelease(void) { if (!params.clipboardToLocal) return; @@ -915,7 +915,7 @@ static void guestCurToLocal(struct DoublePoint *local) // warp support. Instead, we attempt a best-effort emulation which works with a // 1:1 mouse movement patch applied in the guest. For anything fancy, use // capture mode. -static void handleMouseWayland() +static void handleMouseWayland(void) { if (g_cursor.guest.dpiScale == 0) return; @@ -1119,7 +1119,7 @@ static void handleResizeEvent(unsigned int w, unsigned int h) } } -static void handleWindowLeave() +static void handleWindowLeave(void) { g_cursor.inWindow = false; g_cursor.inView = false; @@ -1133,7 +1133,7 @@ static void handleWindowLeave() g_cursor.redraw = true; } -static void handleWindowEnter() +static void handleWindowEnter(void) { g_cursor.inWindow = true; if (!inputEnabled()) @@ -1773,7 +1773,7 @@ static void key_passthrough(SDL_Scancode key, void * opaque) spice_key_up (sc); } -static void register_key_binds() +static void register_key_binds(void) { g_state.kbFS = app_register_keybind(SDL_SCANCODE_F , toggle_fullscreen, NULL); g_state.kbVideo = app_register_keybind(SDL_SCANCODE_V , toggle_video , NULL); @@ -1799,7 +1799,7 @@ static void register_key_binds() g_state.kbPass[1] = app_register_keybind(SDL_SCANCODE_RGUI, key_passthrough, NULL); } -static void release_key_binds() +static void release_key_binds(void) { app_release_keybind(&g_state.kbFS ); app_release_keybind(&g_state.kbVideo); @@ -1813,7 +1813,7 @@ static void release_key_binds() app_release_keybind(&g_state.kbPass[i]); } -static void initSDLCursor() +static void initSDLCursor(void) { const uint8_t data[4] = {0xf, 0x9, 0x9, 0xf}; const uint8_t mask[4] = {0xf, 0xf, 0xf, 0xf}; @@ -1821,7 +1821,7 @@ static void initSDLCursor() SDL_SetCursor(cursor); } -static int lg_run() +static int lg_run(void) { memset(&g_state, 0, sizeof(g_state)); @@ -2218,7 +2218,7 @@ restart: return 0; } -static void lg_shutdown() +static void lg_shutdown(void) { g_state.state = APP_STATE_SHUTDOWN; if (t_render) diff --git a/client/src/wm.c b/client/src/wm.c index e05029c4..a2dfa43b 100644 --- a/client/src/wm.c +++ b/client/src/wm.c @@ -41,7 +41,7 @@ static void wmWaylandUngrabKeyboard(); static void wmWaylandGrabPointer(); static void wmWaylandUngrabPointer(); -void wmInit() +void wmInit(void) { switch (g_state.wminfo.subsystem) { @@ -54,7 +54,7 @@ void wmInit() } } -void wmFree() +void wmFree(void) { switch (g_state.wminfo.subsystem) { @@ -67,7 +67,7 @@ void wmFree() } } -void wmGrabPointer() +void wmGrabPointer(void) { switch(g_state.wminfo.subsystem) { @@ -96,7 +96,7 @@ void wmGrabPointer() g_wmState.pointerGrabbed = true; } -void wmUngrabPointer() +void wmUngrabPointer(void) { switch(g_state.wminfo.subsystem) { @@ -116,7 +116,7 @@ void wmUngrabPointer() g_wmState.pointerGrabbed = false; } -void wmGrabKeyboard() +void wmGrabKeyboard(void) { switch(g_state.wminfo.subsystem) { @@ -151,7 +151,7 @@ void wmGrabKeyboard() g_wmState.keyboardGrabbed = true; } -void wmUngrabKeyboard() +void wmUngrabKeyboard(void) { switch(g_state.wminfo.subsystem) { @@ -174,13 +174,13 @@ void wmUngrabKeyboard() g_wmState.keyboardGrabbed = false; } -void wmGrabAll() +void wmGrabAll(void) { wmGrabPointer(); wmGrabKeyboard(); } -void wmUngrabAll() +void wmUngrabAll(void) { wmUngrabPointer(); wmUngrabKeyboard(); @@ -383,7 +383,7 @@ static const struct wl_seat_listener seatListener = { .name = seatNameHandler, }; -void wmWaylandInit() +void wmWaylandInit(void) { struct WMDataWayland * wm = malloc(sizeof(struct WMDataWayland)); memset(wm, 0, sizeof(struct WMDataWayland)); @@ -418,7 +418,7 @@ static const struct zwp_relative_pointer_v1_listener relativePointerListener = { .relative_motion = relativePointerMotionHandler, }; -static void wmWaylandGrabPointer() +static void wmWaylandGrabPointer(void) { struct WMDataWayland * wm = g_wmState.opaque; @@ -439,7 +439,7 @@ static void wmWaylandGrabPointer() } } -static void wmWaylandUngrabPointer() +static void wmWaylandUngrabPointer(void) { struct WMDataWayland * wm = g_wmState.opaque; @@ -456,7 +456,7 @@ static void wmWaylandUngrabPointer() } } -static void wmWaylandGrabKeyboard() +static void wmWaylandGrabKeyboard(void) { struct WMDataWayland * wm = g_wmState.opaque; @@ -467,7 +467,7 @@ static void wmWaylandGrabKeyboard() } } -static void wmWaylandUngrabKeyboard() +static void wmWaylandUngrabKeyboard(void) { struct WMDataWayland * wm = g_wmState.opaque; @@ -478,7 +478,7 @@ static void wmWaylandUngrabKeyboard() } } -static void wmWaylandFree() +static void wmWaylandFree(void) { struct WMDataWayland * wm = g_wmState.opaque; diff --git a/common/include/common/time.h b/common/include/common/time.h index 7abada18..295711ba 100644 --- a/common/include/common/time.h +++ b/common/include/common/time.h @@ -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); diff --git a/common/src/option.c b/common/src/option.c index 5e03e9d8..c0b5ed66 100644 --- a/common/src/option.c +++ b/common/src/option.c @@ -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" diff --git a/common/src/platform/linux/crash.c b/common/src/platform/linux/crash.c index 3069f605..4ef58c96 100644 --- a/common/src/platform/linux/crash.c +++ b/common/src/platform/linux/crash.c @@ -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); diff --git a/common/src/platform/linux/ivshmem.c b/common/src/platform/linux/ivshmem.c index 55e56cdd..99d54132 100644 --- a/common/src/platform/linux/ivshmem.c +++ b/common/src/platform/linux/ivshmem.c @@ -82,7 +82,7 @@ static StringList ivshmemDeviceGetValues(struct Option * option) return sl; } -void ivshmemOptionsInit() +void ivshmemOptionsInit(void) { struct Option options[] = { diff --git a/common/src/platform/linux/sysinfo.c b/common/src/platform/linux/sysinfo.c index d73d93e5..a39dea38 100644 --- a/common/src/platform/linux/sysinfo.c +++ b/common/src/platform/linux/sysinfo.c @@ -20,7 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include -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); } \ No newline at end of file diff --git a/common/src/platform/windows/ivshmem.c b/common/src/platform/windows/ivshmem.c index a2c94a75..3b4e781c 100644 --- a/common/src/platform/windows/ivshmem.c +++ b/common/src/platform/windows/ivshmem.c @@ -33,7 +33,7 @@ struct IVSHMEMInfo HANDLE handle; }; -void ivshmemOptionsInit() +void ivshmemOptionsInit(void) { static struct Option options[] = { { diff --git a/common/src/platform/windows/sysinfo.c b/common/src/platform/windows/sysinfo.c index 168b318a..dba523f6 100644 --- a/common/src/platform/windows/sysinfo.c +++ b/common/src/platform/windows/sysinfo.c @@ -19,13 +19,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include -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); diff --git a/common/src/platform/windows/windebug.c b/common/src/platform/windows/windebug.c index a24f646f..a4969601 100644 --- a/common/src/platform/windows/windebug.c +++ b/common/src/platform/windows/windebug.c @@ -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) || diff --git a/host/platform/Linux/capture/XCB/src/xcb.c b/host/platform/Linux/capture/XCB/src/xcb.c index 92f6df87..9ac70ba9 100644 --- a/host/platform/Linux/capture/XCB/src/xcb.c +++ b/host/platform/Linux/capture/XCB/src/xcb.c @@ -57,12 +57,12 @@ static unsigned int xcb_getMaxFrameSize(); // implementation -static const char * xcb_getName() +static const char * xcb_getName(void) { return "XCB"; } -static bool xcb_create() +static bool xcb_create(void) { assert(!this); this = (struct xcb *)calloc(sizeof(struct xcb), 1); @@ -80,7 +80,7 @@ static bool xcb_create() return true; } -static bool xcb_init() +static bool xcb_init(void) { assert(this); assert(!this->initialized); @@ -131,7 +131,7 @@ fail: return false; } -static bool xcb_deinit() +static bool xcb_deinit(void) { assert(this); @@ -157,24 +157,24 @@ static bool xcb_deinit() return false; } -static void xcb_free() +static void xcb_free(void) { lgFreeEvent(this->frameEvent); free(this); this = NULL; } -static unsigned int xcb_getMaxFrameSize() +static unsigned int xcb_getMaxFrameSize(void) { return this->width * this->height * 4; } -static unsigned int xcb_getMouseScale() +static unsigned int xcb_getMouseScale(void) { return 100; } -static CaptureResult xcb_capture() +static CaptureResult xcb_capture(void) { assert(this); assert(this->initialized); diff --git a/host/platform/Linux/src/platform.c b/host/platform/Linux/src/platform.c index afe371bc..2111138a 100644 --- a/host/platform/Linux/src/platform.c +++ b/host/platform/Linux/src/platform.c @@ -54,18 +54,18 @@ void sigHandler(int signo) app_quit(); } -bool app_init() +bool app_init(void) { signal(SIGINT, sigHandler); return true; } -const char * os_getExecutable() +const char * os_getExecutable(void) { return app.executable; } -const char * os_getDataPath() +const char * os_getDataPath(void) { return app.dataPath; } diff --git a/host/platform/Windows/capture/DXGI/src/dxgi.c b/host/platform/Windows/capture/DXGI/src/dxgi.c index ac87315b..80e127cf 100644 --- a/host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/host/platform/Windows/capture/DXGI/src/dxgi.c @@ -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) diff --git a/host/platform/Windows/capture/NVFBC/src/nvfbc.c b/host/platform/Windows/capture/NVFBC/src/nvfbc.c index cc63c159..c8255e73 100644 --- a/host/platform/Windows/capture/NVFBC/src/nvfbc.c +++ b/host/platform/Windows/capture/NVFBC/src/nvfbc.c @@ -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; diff --git a/host/platform/Windows/src/mousehook.c b/host/platform/Windows/src/mousehook.c index 369696eb..05df50d8 100644 --- a/host/platform/Windows/src/mousehook.c +++ b/host/platform/Windows/src/mousehook.c @@ -47,7 +47,7 @@ void mouseHook_install(MouseHookFn callback) sendAppMessage(WM_CALL_FUNCTION, 0, (LPARAM)&cf); } -void mouseHook_remove() +void mouseHook_remove(void) { struct MSG_CALL_FUNCTION cf; cf.fn = msg_callback; diff --git a/host/platform/Windows/src/platform.c b/host/platform/Windows/src/platform.c index 9c522395..4d232835 100644 --- a/host/platform/Windows/src/platform.c +++ b/host/platform/Windows/src/platform.c @@ -66,7 +66,7 @@ static ZwSetTimerResolution_t ZwSetTimerResolution = NULL; typedef WINBOOL WINAPI (*PChangeWindowMessageFilterEx)(HWND hwnd, UINT message, DWORD action, void * pChangeFilterStruct); PChangeWindowMessageFilterEx _ChangeWindowMessageFilterEx = NULL; -static void RegisterTrayIcon() +static void RegisterTrayIcon(void) { // register our TrayIcon if (!app.iconData.cbSize) @@ -320,7 +320,7 @@ finish: return result; } -bool app_init() +bool app_init(void) { const char * logFile = option_get_string("os", "logFile" ); @@ -346,12 +346,12 @@ bool app_init() return true; } -const char * os_getExecutable() +const char * os_getExecutable(void) { return app.executable; } -const char * os_getDataPath() +const char * os_getDataPath(void) { static char path[MAX_PATH] = { 0 }; if (!path[0]) @@ -369,7 +369,7 @@ const char * os_getDataPath() return path; } -HWND os_getMessageWnd() +HWND os_getMessageWnd(void) { return app.messageWnd; } diff --git a/host/platform/Windows/src/service.c b/host/platform/Windows/src/service.c index f148c778..48280c9c 100644 --- a/host/platform/Windows/src/service.c +++ b/host/platform/Windows/src/service.c @@ -73,7 +73,7 @@ void doLog(const char * fmt, ...) va_end(args); } -static bool setupAPI() +static bool setupAPI(void) { /* first look in kernel32.dll */ HMODULE mod; @@ -99,7 +99,7 @@ static bool setupAPI() return false; } -static void setupLogging() +static void setupLogging(void) { char tempPath[MAX_PATH+1]; GetTempPathA(sizeof(tempPath), tempPath); @@ -110,13 +110,13 @@ static void setupLogging() doLog("Startup\n"); } -static void finishLogging() +static void finishLogging(void) { doLog("Finished\n"); fclose(service.logFile); } -void winerr() +void winerr(void) { char buf[256]; FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, @@ -172,7 +172,7 @@ fail: return false; } -HANDLE dupeSystemProcessToken() +HANDLE dupeSystemProcessToken(void) { DWORD count = 0; DWORD returned; @@ -235,7 +235,7 @@ err_proc: return NULL; } -DWORD GetInteractiveSessionID() +DWORD GetInteractiveSessionID(void) { PWTS_SESSION_INFO pSessionInfo; DWORD count; @@ -258,7 +258,7 @@ DWORD GetInteractiveSessionID() return ret; } -void Launch() +void Launch(void) { if (!setupAPI()) { @@ -392,7 +392,7 @@ VOID SvcReportEvent(LPTSTR szFunction) } } -void Install() +void Install(void) { TCHAR szPath[MAX_PATH]; @@ -488,7 +488,7 @@ void Install() CloseServiceHandle(schSCManager); } -void Uninstall() +void Uninstall(void) { SC_HANDLE schSCManager; SC_HANDLE schService; diff --git a/host/src/app.c b/host/src/app.c index 335cddea..5486b4cc 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -212,7 +212,7 @@ static int frameThread(void * opaque) return 0; } -bool startThreads() +bool startThreads(void) { app.state = APP_STATE_RUNNING; if (!lgCreateThread("FrameThread", frameThread, NULL, &app.frameThread)) @@ -224,7 +224,7 @@ bool startThreads() return true; } -bool stopThreads() +bool stopThreads(void) { bool ok = true; @@ -242,7 +242,7 @@ bool stopThreads() return ok; } -static bool captureStart() +static bool captureStart(void) { if (app.state == APP_STATE_IDLE) { @@ -265,7 +265,7 @@ static bool captureStart() return startThreads(); } -static bool captureStop() +static bool captureStop(void) { DEBUG_INFO("==== [ Capture Stop ] ===="); if (!stopThreads()) @@ -280,7 +280,7 @@ static bool captureStop() return true; } -static bool captureRestart() +static bool captureRestart(void) { return captureStop() && captureStart(); } @@ -639,7 +639,7 @@ fail: return exitcode; } -void app_quit() +void app_quit(void) { app.state = APP_STATE_SHUTDOWN; } diff --git a/module/test.c b/module/test.c index b384cc18..66a3f51e 100644 --- a/module/test.c +++ b/module/test.c @@ -11,7 +11,7 @@ #include "kvmfr.h" -int main() +int main(void) { int fd = open("/dev/kvmfr0", O_RDWR); if (fd < 0) diff --git a/profile/client/src/main.c b/profile/client/src/main.c index dd9a98aa..0050b026 100644 --- a/profile/client/src/main.c +++ b/profile/client/src/main.c @@ -104,7 +104,7 @@ static bool config_load(int argc, char * argv[]) return true; } -static int run() +static int run(void) { PLGMPClient lgmp; PLGMPClientQueue frameQueue;