Add missing (void) to functions without arguments

This commit is contained in:
fincs 2015-09-06 18:13:31 +02:00
parent 1817f90c6d
commit 0d7a7f4d7d
35 changed files with 111 additions and 111 deletions

View File

@ -5,4 +5,4 @@ void* linearAlloc(size_t size); // returns a 16-byte aligned address
void* linearMemAlign(size_t size, size_t alignment);
void* linearRealloc(void* mem, size_t size); // not implemented yet
void linearFree(void* mem);
u32 linearSpaceFree(); // get free linear space in bytes
u32 linearSpaceFree(void); // get free linear space in bytes

View File

@ -38,7 +38,7 @@ const char* osStrError(u32 error);
*
* This can be used to compare system versions easily with @ref SYSTEM_VERSION.
*/
u32 osGetFirmVersion();
u32 osGetFirmVersion(void);
/**
* @return the kernel version
@ -49,12 +49,12 @@ u32 osGetFirmVersion();
* if(osGetKernelVersion() > SYSTEM_VERSION(2,46,0)) printf("You are running 9.0 or higher\n");
* @endcode
*/
u32 osGetKernelVersion();
u32 osGetKernelVersion(void);
/**
* @return number of milliseconds since 1st Jan 1900 00:00.
*/
u64 osGetTime();
u64 osGetTime(void);
/**
* @brief Returns the Wifi signal strength.
@ -72,4 +72,4 @@ u64 osGetTime();
*
* @return the Wifi signal strength
*/
u8 osGetWifiStrength();
u8 osGetWifiStrength(void);

View File

@ -1,7 +1,7 @@
#pragma once
Result acInit();
Result acExit();
Result acInit(void);
Result acExit(void);
Result ACU_GetWifiStatus(Handle* servhandle, u32 *out);
Result ACU_WaitInternetConnection();
Result ACU_WaitInternetConnection(void);

View File

@ -14,9 +14,9 @@ typedef struct
} TitleList;
Result amInit();
Result amExit();
Handle *amGetSessionHandle();
Result amInit(void);
Result amExit(void);
Handle *amGetSessionHandle(void);
/* AM_GetTitleCount()
About: Gets the number of titles for a given mediatype
@ -107,7 +107,7 @@ Result AM_DeleteAppTitle(u8 mediatype, u64 titleID);
/* AM_InstallNativeFirm()
About: Installs NATIVE_FIRM to NAND (firm0:/ & firm1:/) from a CXI
*/
Result AM_InstallNativeFirm();
Result AM_InstallNativeFirm(void);
/* AM_GetTitleProductCode()
About: Gets the product code of a title based on its title id.

View File

@ -76,12 +76,12 @@ extern Handle hidMemHandle;
extern vu32* hidSharedMem;
Result hidInit(u32* sharedMem);
void hidExit();
void hidExit(void);
void hidScanInput();
u32 hidKeysHeld();
u32 hidKeysDown();
u32 hidKeysUp();
void hidScanInput(void);
u32 hidKeysHeld(void);
u32 hidKeysDown(void);
u32 hidKeysUp(void);
void hidTouchRead(touchPosition* pos);
void hidCircleRead(circlePosition* pos);
void hidAccelRead(accelVector* vector);
@ -98,9 +98,9 @@ void hidWaitForEvent(HID_Event id, bool nextEvent);
#define circleRead hidCircleRead
Result HIDUSER_GetHandles(Handle* outMemHandle, Handle *eventpad0, Handle *eventpad1, Handle *eventaccel, Handle *eventgyro, Handle *eventdebugpad);
Result HIDUSER_EnableAccelerometer();
Result HIDUSER_DisableAccelerometer();
Result HIDUSER_EnableGyroscope();
Result HIDUSER_DisableGyroscope();
Result HIDUSER_EnableAccelerometer(void);
Result HIDUSER_DisableAccelerometer(void);
Result HIDUSER_EnableGyroscope(void);
Result HIDUSER_DisableGyroscope(void);
Result HIDUSER_GetGyroscopeRawToDpsCoefficient(float *coeff);
Result HIDUSER_GetSoundVolume(u8 *volume); //Return the volume slider value (0-63)

View File

@ -12,8 +12,8 @@ typedef enum{
#define HTTPC_RESULTCODE_DOWNLOADPENDING 0xd840a02b
Result httpcInit();
void httpcExit();
Result httpcInit(void);
void httpcExit(void);
Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy);//use_defaultproxy should be zero normally, unless you don't want HTTPC_SetProxyDefault() to be used automatically.
Result httpcCloseContext(httpcContext *context);

View File

@ -1,8 +1,8 @@
#pragma once
Result IRU_Initialize(u32 *sharedmem_addr, u32 sharedmem_size);//The permissions for the specified memory is set to RO. This memory must be already mapped.
Result IRU_Shutdown();
Handle IRU_GetServHandle();
Result IRU_Shutdown(void);
Handle IRU_GetServHandle(void);
Result IRU_SendData(u8 *buf, u32 size, u32 wait);
Result IRU_RecvData(u8 *buf, u32 size, u8 flag, u32 *transfercount, u32 wait);
Result IRU_SetBitRate(u8 value);

View File

@ -10,10 +10,10 @@ extern Handle irrstMemHandle;
extern vu32* irrstSharedMem;
Result irrstInit(u32* sharedMem);
void irrstExit();
void irrstExit(void);
void irrstScanInput();
u32 irrstKeysHeld();
void irrstScanInput(void);
u32 irrstKeysHeld(void);
void irrstCstickRead(circlePosition* pos);
void irrstWaitForEvent(bool nextEvent);

View File

@ -3,14 +3,14 @@
//See also: http://3dbrew.org/wiki/MIC_Services
Result MIC_Initialize(u32 *sharedmem, u32 sharedmem_size, u8 control, u8 recording, u8 unk0, u8 unk1, u8 unk2);//sharedmem_size = audiodata size + 4, aligned to 0x1000-bytes. The sharedmem ptr must be 0x1000-bytes aligned. The offical 3ds-sound app uses the following values for unk0-unk2: 3, 1, and 1.
Result MIC_Shutdown();
u32 MIC_GetSharedMemOffsetValue();
Result MIC_Shutdown(void);
u32 MIC_GetSharedMemOffsetValue(void);
u32 MIC_ReadAudioData(u8 *outbuf, u32 readsize, u32 waitforevent);//Reads MIC audio data. When waitforevent is non-zero, this clears the event, then waits for MIC-module to signal it again when audio data is written to shared-mem. The return value is the actual byte-size of the read data.
Result MIC_MapSharedMem(Handle handle, u32 size);
Result MIC_UnmapSharedMem();
Result MIC_UnmapSharedMem(void);
Result MIC_cmd3_Initialize(u8 unk0, u8 unk1, u32 sharedmem_baseoffset, u32 sharedmem_endoffset, u8 unk2);
Result MIC_cmd5();
Result MIC_cmd5(void);
Result MIC_GetCNTBit15(u8 *out);
Result MIC_GetEventHandle(Handle *handle);
Result MIC_SetControl(u8 value);//See here: http://3dbrew.org/wiki/MIC_Services

View File

@ -38,7 +38,7 @@ typedef struct {
void mvdstdGenerateDefaultConfig(mvdstdConfig *config, u32 input_width, u32 input_height, u32 output_width, u32 output_height, u32 *vaddr_colorconv_indata, u32 *vaddr_outdata0, u32 *vaddr_outdata1_colorconv);
Result mvdstdInit(mvdstdMode mode, mvdstdTypeInput input_type, mvdstdTypeOutput output_type, u32 size);//The input size isn't used when type==MVDTYPE_COLORFORMATCONV. Video processing / H.264 isn't supported currently.
Result mvdstdShutdown();
Result mvdstdShutdown(void);
Result mvdstdSetConfig(mvdstdConfig *config);
Result mvdstdProcessFrame(mvdstdConfig *config, u32 *h264_vaddr_inframe, u32 h264_inframesize, u32 h264_frameid);

View File

@ -5,8 +5,8 @@
*/
Result newsInit();
Result newsExit();
Result newsInit(void);
Result newsExit(void);
/* NEWSU_AddNotification()
About: Adds a notification to the home menu Notifications applet.

View File

@ -4,8 +4,8 @@
Requires access to "ns:s" service
*/
Result nsInit();
Result nsExit();
Result nsInit(void);
Result nsExit(void);
/* NS_LaunchTitle()
titleid TitleId of title to launch, if 0, gamecard assumed

View File

@ -4,8 +4,8 @@
Requires access to "pm:app" service
*/
Result pmInit();
Result pmExit();
Result pmInit(void);
Result pmExit(void);
/* PM_LaunchTitle()
About: Launches a title

View File

@ -28,8 +28,8 @@ typedef enum
Requires access to "ps:ps" service
*/
Result psInit();
Result psExit();
Result psInit(void);
Result psExit(void);
/* PS_EncryptDecryptAes()
About: Is an interface for the AES Engine, you can only use predetermined keyslots though.

View File

@ -1,7 +1,7 @@
#pragma once
Result ptmInit();
Result ptmExit();
Result ptmInit(void);
Result ptmExit(void);
Result PTMU_GetShellState(Handle* servhandle, u8 *out);
Result PTMU_GetBatteryLevel(Handle* servhandle, u8 *out);

View File

@ -15,9 +15,9 @@ typedef struct {
u32 unk_x2c[5];//"Not used by System_Settings."
} qtmHeadtrackingInfo;
Result qtmInit();
void qtmExit();
bool qtmCheckInitialized();
Result qtmInit(void);
void qtmExit(void);
bool qtmCheckInitialized(void);
Result qtmGetHeadtrackingInfo(u64 val, qtmHeadtrackingInfo *out);//val is normally 0.
bool qtmCheckHeadFullyDetected(qtmHeadtrackingInfo *info);

View File

@ -118,7 +118,7 @@ typedef struct
*
* This will internally get the handle of the service, and on success call Y2RU_DriverInitialize.
*/
Result y2rInit();
Result y2rInit(void);
/**
@ -126,7 +126,7 @@ Result y2rInit();
*
* This will internally call Y2RU_DriverFinalize and close the handle of the service.
*/
Result y2rExit();
Result y2rExit(void);
/**

View File

@ -1,13 +1,13 @@
#pragma once
Result srvInit();
Result srvExit();
Handle *srvGetSessionHandle();
Result srvRegisterClient();
Result srvInit(void);
Result srvExit(void);
Handle *srvGetSessionHandle(void);
Result srvRegisterClient(void);
Result srvGetServiceHandle(Handle* out, const char* name);
Result srvRegisterService(Handle* out, const char* name, int maxSessions);
Result srvUnregisterService(const char* name);
Result srvPmInit();
Result srvPmInit(void);
Result srvRegisterProcess(u32 procid, u32 count, void *serviceaccesscontrol);
Result srvUnregisterProcess(u32 procid);

View File

@ -5,4 +5,4 @@ void* vramAlloc(size_t size); // returns a 16-byte aligned address
void* vramMemAlign(size_t size, size_t alignment);
void* vramRealloc(void* mem, size_t size); // not implemented yet
void vramFree(void* mem);
u32 vramSpaceFree(); // get free VRAM space in bytes
u32 vramSpaceFree(void); // get free VRAM space in bytes

View File

@ -50,7 +50,7 @@ u32 osConvertOldLINEARMemToNew(u32 vaddr) {
}
//---------------------------------------------------------------------------------
static datetime_t getSysTime() {
static datetime_t getSysTime(void) {
//---------------------------------------------------------------------------------
u32 s1, s2 = *__datetime_selector & 1;
datetime_t dt;
@ -98,7 +98,7 @@ int __libctru_gtod(struct _reent *ptr, struct timeval *tp, struct timezone *tz)
// Returns number of milliseconds since 1st Jan 1900 00:00.
//---------------------------------------------------------------------------------
u64 osGetTime() {
u64 osGetTime(void) {
//---------------------------------------------------------------------------------
datetime_t dt = getSysTime();
@ -108,13 +108,13 @@ u64 osGetTime() {
}
//---------------------------------------------------------------------------------
u32 osGetFirmVersion() {
u32 osGetFirmVersion(void) {
//---------------------------------------------------------------------------------
return (*(u32*)0x1FF80060) & ~0xFF;
}
//---------------------------------------------------------------------------------
u32 osGetKernelVersion() {
u32 osGetKernelVersion(void) {
//---------------------------------------------------------------------------------
return (*(u32*)0x1FF80000) & ~0xFF;
}

View File

@ -6,14 +6,14 @@
static Handle acHandle;
Result acInit()
Result acInit(void)
{
Result ret = srvGetServiceHandle(&acHandle, "ac:u");
if(!ret)return ret;
return srvGetServiceHandle(&acHandle, "ac:i");
}
Result acExit()
Result acExit(void)
{
return svcCloseHandle(acHandle);
}
@ -82,7 +82,7 @@ Result ACU_GetWifiStatus(Handle* servhandle, u32 *out)
return (Result)cmdbuf[1];
}
Result ACU_WaitInternetConnection()
Result ACU_WaitInternetConnection(void)
{
Handle servhandle = 0;
Result ret=0;

View File

@ -8,7 +8,7 @@
static Handle amHandle = 0;
Result amInit()
Result amInit(void)
{
if(srvGetServiceHandle(&amHandle, "am:net") == 0)
return (Result)0;
@ -19,12 +19,12 @@ Result amInit()
else return srvGetServiceHandle(&amHandle, "am:app");
}
Result amExit()
Result amExit(void)
{
return svcCloseHandle(amHandle);
}
Handle *amGetSessionHandle()
Handle *amGetSessionHandle(void)
{
return &amHandle;
}
@ -179,7 +179,7 @@ Result AM_DeleteAppTitle(u8 mediatype, u64 titleID)
return (Result)cmdbuf[1];
}
Result AM_InstallNativeFirm()
Result AM_InstallNativeFirm(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();

View File

@ -63,7 +63,7 @@ cleanup1:
return ret;
}
void hidExit()
void hidExit(void)
{
if(!hidInitialised) return;
@ -110,7 +110,7 @@ u32 hidCheckSectionUpdateTime(vu32 *sharedmem_section, u32 id)
return 0;
}
void hidScanInput()
void hidScanInput(void)
{
u32 Id=0;
@ -160,17 +160,17 @@ void hidScanInput()
}
}
u32 hidKeysHeld()
u32 hidKeysHeld(void)
{
return kHeld;
}
u32 hidKeysDown()
u32 hidKeysDown(void)
{
return kDown;
}
u32 hidKeysUp()
u32 hidKeysUp(void)
{
return kUp;
}
@ -214,7 +214,7 @@ Result HIDUSER_GetHandles(Handle* outMemHandle, Handle *eventpad0, Handle *event
return cmdbuf[1];
}
Result HIDUSER_EnableAccelerometer()
Result HIDUSER_EnableAccelerometer(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x110000; //request header code
@ -225,7 +225,7 @@ Result HIDUSER_EnableAccelerometer()
return cmdbuf[1];
}
Result HIDUSER_DisableAccelerometer()
Result HIDUSER_DisableAccelerometer(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x120000; //request header code
@ -236,7 +236,7 @@ Result HIDUSER_DisableAccelerometer()
return cmdbuf[1];
}
Result HIDUSER_EnableGyroscope()
Result HIDUSER_EnableGyroscope(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x130000; //request header code
@ -247,7 +247,7 @@ Result HIDUSER_EnableGyroscope()
return cmdbuf[1];
}
Result HIDUSER_DisableGyroscope()
Result HIDUSER_DisableGyroscope(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x140000; //request header code

View File

@ -6,7 +6,7 @@
Handle __httpc_servhandle = 0;
Result httpcInit()
Result httpcInit(void)
{
Result ret=0;
@ -21,7 +21,7 @@ Result httpcInit()
return 0;
}
void httpcExit()
void httpcExit(void)
{
if(__httpc_servhandle==0)return;

View File

@ -10,7 +10,7 @@ static Handle iru_sharedmem_handle=0;
static u32 *iru_sharedmem = NULL;
static u32 iru_sharedmem_size = 0;
Result irucmd_Initialize()
Result irucmd_Initialize(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
@ -23,7 +23,7 @@ Result irucmd_Initialize()
return ret;
}
Result irucmd_Shutdown()
Result irucmd_Shutdown(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
@ -52,7 +52,7 @@ Result irucmd_StartSendTransfer(u8 *buf, u32 size)
return ret;
}
Result irucmd_WaitSendTransfer()
Result irucmd_WaitSendTransfer(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
@ -177,7 +177,7 @@ Result IRU_Initialize(u32 *sharedmem_addr, u32 sharedmem_size)
return ret;
}
Result IRU_Shutdown()
Result IRU_Shutdown(void)
{
Result ret = 0;
@ -195,7 +195,7 @@ Result IRU_Shutdown()
return 0;
}
Handle IRU_GetServHandle()
Handle IRU_GetServHandle(void)
{
return iru_handle;
}

View File

@ -53,7 +53,7 @@ cleanup1:
return ret;
}
void irrstExit()
void irrstExit(void)
{
if(!irrstUsed)return;
@ -88,7 +88,7 @@ u32 irrstCheckSectionUpdateTime(vu32 *sharedmem_section, u32 id)
return 0;
}
void irrstScanInput()
void irrstScanInput(void)
{
if(!irrstUsed)return;
@ -105,7 +105,7 @@ void irrstScanInput()
}
}
u32 irrstKeysHeld()
u32 irrstKeysHeld(void)
{
if(irrstUsed)return kHeld;
return 0;

View File

@ -54,7 +54,7 @@ Result MIC_Initialize(u32 *sharedmem, u32 sharedmem_size, u8 control, u8 recordi
return 0;
}
Result MIC_Shutdown()
Result MIC_Shutdown(void)
{
Result ret=0;
@ -84,7 +84,7 @@ Result MIC_Shutdown()
return 0;
}
u32 MIC_GetSharedMemOffsetValue()
u32 MIC_GetSharedMemOffsetValue(void)
{
u32 pos = 0;
@ -137,7 +137,7 @@ Result MIC_MapSharedMem(Handle handle, u32 size)
return (Result)cmdbuf[1];
}
Result MIC_UnmapSharedMem()
Result MIC_UnmapSharedMem(void)
{
Result ret=0;
u32 *cmdbuf = getThreadCommandBuffer();
@ -166,7 +166,7 @@ Result MIC_cmd3_Initialize(u8 unk0, u8 unk1, u32 sharedmem_baseoffset, u32 share
return (Result)cmdbuf[1];
}
Result MIC_cmd5()
Result MIC_cmd5(void)
{
Result ret=0;
u32 *cmdbuf = getThreadCommandBuffer();

View File

@ -34,7 +34,7 @@ static Result mvdstdipc_Initialize(u32 *buf, u32 bufsize, Handle kprocess)
return cmdbuf[1];
}
static Result mvdstdipc_Shutdown()
static Result mvdstdipc_Shutdown(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x00020000; //request header code
@ -45,7 +45,7 @@ static Result mvdstdipc_Shutdown()
return cmdbuf[1];
}
static Result mvdstdipc_cmd18()
static Result mvdstdipc_cmd18(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x00180000; //request header code
@ -56,7 +56,7 @@ static Result mvdstdipc_cmd18()
return cmdbuf[1];
}
static Result mvdstdipc_cmd19()
static Result mvdstdipc_cmd19(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x00190000; //request header code
@ -67,7 +67,7 @@ static Result mvdstdipc_cmd19()
return cmdbuf[1];
}
static Result mvdstdipc_cmd1a()
static Result mvdstdipc_cmd1a(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x001A0000; //request header code
@ -173,7 +173,7 @@ Result mvdstdInit(mvdstdMode mode, mvdstdTypeInput input_type, mvdstdTypeOutput
return 0;
}
Result mvdstdShutdown()
Result mvdstdShutdown(void)
{
if(!mvdstdInitialized)return 0;

View File

@ -19,11 +19,11 @@ typedef struct {
static Handle newsHandle = 0;
Result newsInit() {
Result newsInit(void) {
return srvGetServiceHandle(&newsHandle, "news:u");
}
Result newsExit() {
Result newsExit(void) {
return svcCloseHandle(newsHandle);
}

View File

@ -6,12 +6,12 @@
static Handle nsHandle;
Result nsInit()
Result nsInit(void)
{
return srvGetServiceHandle(&nsHandle, "ns:s");
}
Result nsExit()
Result nsExit(void)
{
return svcCloseHandle(nsHandle);
}

View File

@ -7,12 +7,12 @@
static Handle pmHandle;
Result pmInit()
Result pmInit(void)
{
return srvGetServiceHandle(&pmHandle, "pm:app");
}
Result pmExit()
Result pmExit(void)
{
return svcCloseHandle(pmHandle);
}

View File

@ -6,12 +6,12 @@
static Handle psHandle;
Result psInit()
Result psInit(void)
{
return srvGetServiceHandle(&psHandle, "ps:ps");
}
Result psExit()
Result psExit(void)
{
return svcCloseHandle(psHandle);
}

View File

@ -7,12 +7,12 @@
static Handle ptmHandle;
Result ptmInit()
Result ptmInit(void)
{
return srvGetServiceHandle(&ptmHandle, "ptm:u");
}
Result ptmExit()
Result ptmExit(void)
{
return svcCloseHandle(ptmHandle);
}

View File

@ -12,7 +12,7 @@ Handle qtmHandle;
static bool qtmInitialized = false;
Result qtmInit()
Result qtmInit(void)
{
Result ret=0;
@ -25,7 +25,7 @@ Result qtmInit()
return 0;
}
void qtmExit()
void qtmExit(void)
{
if(!qtmInitialized)return;
@ -33,7 +33,7 @@ void qtmExit()
qtmInitialized = false;
}
bool qtmCheckInitialized()
bool qtmCheckInitialized(void)
{
return qtmInitialized;
}

View File

@ -73,7 +73,7 @@ void __destroy_handle_list(void) {
}
Result srvInit()
Result srvInit(void)
{
Result rc = 0;
@ -89,7 +89,7 @@ Result srvInit()
return rc;
}
Result srvExit()
Result srvExit(void)
{
if(g_srv_handle != 0)svcCloseHandle(g_srv_handle);
@ -97,12 +97,12 @@ Result srvExit()
return 0;
}
Handle *srvGetSessionHandle()
Handle *srvGetSessionHandle(void)
{
return &g_srv_handle;
}
Result srvRegisterClient()
Result srvRegisterClient(void)
{
Result rc = 0;
@ -170,7 +170,7 @@ Result srvUnregisterService(const char* name)
}
// Old srv:pm interface, will only work on systems where srv:pm was a port (<7.X)
Result srvPmInit()
Result srvPmInit(void)
{
Result rc = 0;