diff --git a/nx/include/switch/gfx/gfx.h b/nx/include/switch/gfx/gfx.h index 8b037001..0f47e16e 100644 --- a/nx/include/switch/gfx/gfx.h +++ b/nx/include/switch/gfx/gfx.h @@ -35,8 +35,8 @@ void gfxConfigureAutoResolution(bool enable, s32 handheld_width, s32 handheld_he /// Wrapper for gfxConfigureAutoResolution(). handheld_resolution=720p, docked_resolution={all-zero for using current maximum resolution}. void gfxConfigureAutoResolutionDefault(bool enable); -void gfxWaitForVsync(); -void gfxSwapBuffers(); +void gfxWaitForVsync(void); +void gfxSwapBuffers(void); /// Get the current framebuffer address, with optional output ptrs for the display width/height. The display width/height is adjusted by gfxConfigureCrop()/gfxConfigureResolution(). u8* gfxGetFramebuffer(u32* width, u32* height); diff --git a/nx/include/switch/kernel/svc.h b/nx/include/switch/kernel/svc.h index d42cfd81..1817f517 100644 --- a/nx/include/switch/kernel/svc.h +++ b/nx/include/switch/kernel/svc.h @@ -31,10 +31,10 @@ Result svcSetHeapSize(void** out_addr, u64 size); Result svcMapMemory(void* dst_addr, void* src_addr, u64 size); Result svcUnmapMemory(void* dst_addr, void* src_addr, u64 size); Result svcQueryMemory(MemoryInfo* meminfo_ptr, u32 *pageinfo, u64 addr); -void NORETURN svcExitProcess(); +void NORETURN svcExitProcess(void); Result svcCreateThread(Handle* out, void* entry, void* arg, void* stack_top, int prio, int cpuid); Result svcStartThread(Handle handle); -void NORETURN svcExitThread(); +void NORETURN svcExitThread(void); Result svcSleepThread(u64 nano); Result svcClearEvent(Handle handle); Result svcCloseHandle(Handle handle); diff --git a/nx/include/switch/kernel/version.h b/nx/include/switch/kernel/version.h index 44762fac..0f9413e1 100644 --- a/nx/include/switch/kernel/version.h +++ b/nx/include/switch/kernel/version.h @@ -1,4 +1,4 @@ // Copyright 2017 plutoo -bool kernelAbove200(); -bool kernelAbove300(); -bool kernelAbove400(); +bool kernelAbove200(void); +bool kernelAbove300(void); +bool kernelAbove400(void); diff --git a/nx/include/switch/services/bsd.h b/nx/include/switch/services/bsd.h index fc63804b..ff982871 100644 --- a/nx/include/switch/services/bsd.h +++ b/nx/include/switch/services/bsd.h @@ -7,7 +7,7 @@ struct bsd_sockaddr_in { }; Result bsdInitialize(TransferMemory* tmem); -int bsdGetErrno(); +int bsdGetErrno(void); int bsdConnect(int sockfd, void* addr, u32 addrlen); int bsdSocket(int domain, int type, int protocol); int bsdBind(int sockfd, void* addr, u32 addrlen); diff --git a/nx/include/switch/services/fs.h b/nx/include/switch/services/fs.h index a4610a00..9d5d4b0a 100644 --- a/nx/include/switch/services/fs.h +++ b/nx/include/switch/services/fs.h @@ -77,7 +77,7 @@ typedef enum FS_CONTENTSTORAGEID_SdCard = 2, } FsContentStorageId; -Result fsInitialize(); +Result fsInitialize(void); void fsExit(void); Handle fsGetServiceSession(void); diff --git a/nx/include/switch/services/pm.h b/nx/include/switch/services/pm.h index 706a46cc..e281b648 100644 --- a/nx/include/switch/services/pm.h +++ b/nx/include/switch/services/pm.h @@ -1,5 +1,5 @@ // Copyright 2017 plutoo -Result pmdmntInitialize(); +Result pmdmntInitialize(void); Result pmdmntStartProcess(u64 pid); Result pmdmntGetTitlePid(u64* pid_out, u64 title_id); Result pmdmntEnableDebugForTitleId(Handle* handle_out, u64 title_id); diff --git a/nx/include/switch/services/sm.h b/nx/include/switch/services/sm.h index de38324f..d70451c1 100644 --- a/nx/include/switch/services/sm.h +++ b/nx/include/switch/services/sm.h @@ -1,6 +1,6 @@ -bool smHasInitialized(); -Result smInitialize(); +Result smInitialize(void); void smExit(void); Result smGetService(Handle* handle_out, const char* name); Result smRegisterService(Handle* handle_out, const char* name, bool is_light, int max_sessions); Result smUnregisterService(const char* name); +bool smHasInitialized(void); diff --git a/nx/include/switch/services/vi.h b/nx/include/switch/services/vi.h index 3dde4400..59c1ce8d 100644 --- a/nx/include/switch/services/vi.h +++ b/nx/include/switch/services/vi.h @@ -28,13 +28,13 @@ typedef enum { } ViScalingMode; Result viInitialize(ViServiceType servicetype); -void viExit(); -Handle viGetSessionService(); -Handle viGetSession_IApplicationDisplayService(); -Handle viGetSession_IHOSBinderDriverRelay(); -Handle viGetSession_ISystemDisplayService(); -Handle viGetSession_IManagerDisplayService(); -Handle viGetSession_IHOSBinderDriverIndirect(); +void viExit(void); +Handle viGetSessionService(void); +Handle viGetSession_IApplicationDisplayService(void); +Handle viGetSession_IHOSBinderDriverRelay(void); +Handle viGetSession_ISystemDisplayService(void); +Handle viGetSession_IManagerDisplayService(void); +Handle viGetSession_IHOSBinderDriverIndirect(void); Result viOpenDisplay(const char *DisplayName, ViDisplay *display); Result viCloseDisplay(ViDisplay *display); diff --git a/nx/source/gfx/buffer_producer.c b/nx/source/gfx/buffer_producer.c index 016e09ef..060af053 100644 --- a/nx/source/gfx/buffer_producer.c +++ b/nx/source/gfx/buffer_producer.c @@ -33,7 +33,7 @@ Result bufferProducerInitialize(Binder *session) return 0; } -void bufferProducerExit() +void bufferProducerExit(void) { g_bufferProducerBinderSession = NULL; } diff --git a/nx/source/gfx/gfx.c b/nx/source/gfx/gfx.c index 912e621f..97263324 100644 --- a/nx/source/gfx/gfx.c +++ b/nx/source/gfx/gfx.c @@ -295,7 +295,7 @@ static Result _gfxInit(ViServiceType servicetype, const char *DisplayName, u32 L return rc; } -void gfxInitDefault() +void gfxInitDefault(void) { nvServiceType nv_servicetype; @@ -317,7 +317,8 @@ void gfxInitDefault() if (R_FAILED(rc)) fatalSimple(rc); } -void gfxExit() { +void gfxExit(void) +{ u32 i = 0; if (!g_gfxInitialized) return; @@ -463,11 +464,11 @@ static void _waitevent(Handle *handle) { if (R_FAILED(rc2)) fatalSimple(rc2); } -void gfxWaitForVsync() { +void gfxWaitForVsync(void) { _waitevent(&g_gfxDisplayVsyncEvent); } -void gfxSwapBuffers() { +void gfxSwapBuffers(void) { Result rc=0; rc = _gfxQueueBuffer(g_gfxCurrentProducerBuffer); diff --git a/nx/source/kernel/mutex.c b/nx/source/kernel/mutex.c index 5843e590..776a606a 100644 --- a/nx/source/kernel/mutex.c +++ b/nx/source/kernel/mutex.c @@ -4,7 +4,7 @@ #define HAS_LISTENERS 0x40000000 -static u32 _GetTag() { +static u32 _GetTag(void) { return getThreadVars()->handle; } diff --git a/nx/source/kernel/version.c b/nx/source/kernel/version.c index 4bb9748f..afeda2b6 100644 --- a/nx/source/kernel/version.c +++ b/nx/source/kernel/version.c @@ -6,7 +6,7 @@ static bool g_IsAbove300; static bool g_IsAbove400; static bool g_HasCached = 0; -static void _CacheValues() +static void _CacheValues(void) { // This is actually thread safe, might cache twice but that's fine. if (!g_HasCached) @@ -19,17 +19,17 @@ static void _CacheValues() } } -bool kernelAbove200() { +bool kernelAbove200(void) { _CacheValues(); return g_IsAbove200; } -bool kernelAbove300() { +bool kernelAbove300(void) { _CacheValues(); return g_IsAbove300; } -bool kernelAbove400() { +bool kernelAbove400(void) { _CacheValues(); return g_IsAbove400; } diff --git a/nx/source/kernel/virtmem.c b/nx/source/kernel/virtmem.c index 3e586417..ad958471 100644 --- a/nx/source/kernel/virtmem.c +++ b/nx/source/kernel/virtmem.c @@ -39,7 +39,7 @@ static inline bool _InRegion(VirtualRegion* r, u64 addr) { return (addr >= r->start) && (addr < r->end); } -void virtmemSetup() { +void virtmemSetup(void) { if (R_FAILED(_GetRegionFromInfo(&g_AddressSpace, 12, 13))) { // Default values in case we're running on 1.0.0 // Assumes 32-bit address space diff --git a/nx/source/runtime/devices/console.c b/nx/source/runtime/devices/console.c index e25894d0..113130f1 100644 --- a/nx/source/runtime/devices/console.c +++ b/nx/source/runtime/devices/console.c @@ -600,7 +600,7 @@ void consoleSetFont(PrintConsole* console, ConsoleFont* font){ } //--------------------------------------------------------------------------------- -static void newRow() { +static void newRow(void) { //--------------------------------------------------------------------------------- diff --git a/nx/source/runtime/init.c b/nx/source/runtime/init.c index 9860f773..5bb76df2 100644 --- a/nx/source/runtime/init.c +++ b/nx/source/runtime/init.c @@ -2,7 +2,7 @@ void __nx_exit(int rc); -void virtmemSetup(); +void virtmemSetup(void); void newlibSetup(Handle main_thread); void __system_initArgv(void); @@ -12,7 +12,7 @@ __attribute__((weak)) size_t __nx_inner_heap_size = INNER_HEAP_SIZE; __attribute__((weak)) char __nx_inner_heap[INNER_HEAP_SIZE]; __attribute__((weak)) size_t __nx_outer_heap_size = 0x2000000*16;//Must be a multiple of 0x2000000. -void __attribute__((weak)) __libnx_initheap() +void __attribute__((weak)) __libnx_initheap(void) { u64 addr; Result rc = svcSetHeapSize((void**)&addr, __nx_outer_heap_size); diff --git a/nx/source/runtime/newlib.c b/nx/source/runtime/newlib.c index be0e4288..bf1f05ab 100644 --- a/nx/source/runtime/newlib.c +++ b/nx/source/runtime/newlib.c @@ -11,7 +11,7 @@ extern const u8 __tdata_lma[]; extern const u8 __tdata_lma_end[]; extern u8 __tls_start[]; -static struct _reent* __libnx_get_reent() { +static struct _reent* __libnx_get_reent(void) { ThreadVars* tv = getThreadVars(); if (tv->magic != THREADVARS_MAGIC) fatalSimple(MAKERESULT(MODULE_LIBNX, LIBNX_BADREENT)); diff --git a/nx/source/services/bsd.c b/nx/source/services/bsd.c index 7214814d..28a9966a 100644 --- a/nx/source/services/bsd.c +++ b/nx/source/services/bsd.c @@ -110,7 +110,7 @@ Result bsdInitialize(TransferMemory* tmem) { return rc; } -int bsdGetErrno() { +int bsdGetErrno(void) { return g_Errno; } diff --git a/nx/source/services/fs.c b/nx/source/services/fs.c index d58f57a8..c8a9f6e6 100644 --- a/nx/source/services/fs.c +++ b/nx/source/services/fs.c @@ -3,7 +3,7 @@ static Handle g_fsHandle = INVALID_HANDLE; -Result fsInitialize() { +Result fsInitialize(void) { if (g_fsHandle != INVALID_HANDLE) return 0; diff --git a/nx/source/services/pm.c b/nx/source/services/pm.c index cd1257d9..bd27afce 100644 --- a/nx/source/services/pm.c +++ b/nx/source/services/pm.c @@ -3,7 +3,7 @@ static Handle g_pmdmntHandle = INVALID_HANDLE; -Result pmdmntInitialize() { +Result pmdmntInitialize(void) { Result rc = smGetService(&g_pmdmntHandle, "pm:dmnt"); if (R_FAILED(rc)) { diff --git a/nx/source/services/sm.c b/nx/source/services/sm.c index 095979e0..5d99d49a 100644 --- a/nx/source/services/sm.c +++ b/nx/source/services/sm.c @@ -3,12 +3,13 @@ static Handle g_smHandle = -1; -bool smHasInitialized() { +bool smHasInitialized(void) { return g_smHandle != -1; } -Result smInitialize() { - if(smHasInitialized())return 0; +Result smInitialize(void) { + if (smHasInitialized()) + return 0; Result rc = svcConnectToNamedPort(&g_smHandle, "sm:"); Handle tmp; @@ -50,7 +51,7 @@ Result smInitialize() { } void smExit(void) { - if(smHasInitialized()) { + if (smHasInitialized()) { svcCloseHandle(g_smHandle); g_smHandle = -1; } diff --git a/nx/source/services/vi.c b/nx/source/services/vi.c index 935342c5..0ea20dff 100644 --- a/nx/source/services/vi.c +++ b/nx/source/services/vi.c @@ -69,7 +69,7 @@ Result viInitialize(ViServiceType servicetype) return rc; } -void viExit() +void viExit(void) { if(g_viServiceType == -1) return; @@ -102,32 +102,32 @@ void viExit() } } -Handle viGetSessionService() +Handle viGetSessionService(void) { return g_viServiceSession; } -Handle viGetSession_IApplicationDisplayService() +Handle viGetSession_IApplicationDisplayService(void) { return g_viIApplicationDisplayService; } -Handle viGetSession_IHOSBinderDriverRelay() +Handle viGetSession_IHOSBinderDriverRelay(void) { return g_viIHOSBinderDriverRelay; } -Handle viGetSession_ISystemDisplayService() +Handle viGetSession_ISystemDisplayService(void) { return g_viISystemDisplayService; } -Handle viGetSession_IManagerDisplayService() +Handle viGetSession_IManagerDisplayService(void) { return g_viIManagerDisplayService; } -Handle viGetSession_IHOSBinderDriverIndirect() +Handle viGetSession_IHOSBinderDriverIndirect(void) { return g_viIHOSBinderDriverIndirect; }