Eliminate various warnings.

This commit is contained in:
Ralf Corsepius
2009-12-07 07:12:20 +00:00
parent 82292dc51b
commit ca11e7817e
10 changed files with 43 additions and 42 deletions

View File

@@ -115,7 +115,7 @@ int crc16_slow(u8 * data, int length) {
return crc;
}
void GetWfcSettings() {
void GetWfcSettings(void) {
u8 data[256];
int i,n, c;
unsigned long s;
@@ -517,7 +517,7 @@ void Wifi_TxRaw(u16 * data, int datalen) {
WifiData->stats[WSTAT_TXDATABYTES]+=datalen-12;
}
int Wifi_TxCheck() {
int Wifi_TxCheck(void) {
if(WIFI_REG(0xA8)&0x8000) return 0;
return 1;
}
@@ -528,7 +528,7 @@ int Wifi_TxCheck() {
// Wifi Interrupts
//
void Wifi_Intr_RxEnd() {
void Wifi_Intr_RxEnd(void) {
int base;
int packetlen;
int full_packetlen;
@@ -570,7 +570,7 @@ void Wifi_Intr_RxEnd() {
u16 count_ofs_list[CNT_STAT_NUM] = {
0x1B0, 0x1B2, 0x1B4, 0x1B6, 0x1B8, 0x1BA, 0x1BC, 0x1BE, 0x1C0, 0x1C4, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DC, 0x1DE
};
void Wifi_Intr_CntOverflow() {
void Wifi_Intr_CntOverflow(void) {
int i;
int s,d;
s=CNT_STAT_START;
@@ -581,13 +581,13 @@ void Wifi_Intr_CntOverflow() {
}
}
void Wifi_Intr_StartTx() {
void Wifi_Intr_StartTx(void) {
if(WifiData->reqReqFlags&WFLAG_REQ_PROMISC) { // attempt to ensure packet is received
}
}
void Wifi_Intr_TxEnd() { // assume that we can now tx something new.
void Wifi_Intr_TxEnd(void) { // assume that we can now tx something new.
if(arm7qlen) {
Wifi_TxRaw(arm7q, arm7qlen);
keepalive_time=0;
@@ -609,18 +609,18 @@ void Wifi_Intr_TxEnd() { // assume that we can now tx something new.
}
}
void Wifi_Intr_TBTT() {
void Wifi_Intr_TBTT(void) {
if(WIFI_REG(0xA8)&0x8000) {
WIFI_REG(0xAE)=0x000D;
}
}
void Wifi_Intr_DoNothing() {
void Wifi_Intr_DoNothing(void) {
}
void Wifi_Interrupt() {
void Wifi_Interrupt(void) {
int wIF;
if(!WifiData) return;
if(!(WifiData->flags7&WFLAG_ARM7_RUNNING)) return;
@@ -653,7 +653,7 @@ void Wifi_Interrupt() {
void Wifi_Update() {
void Wifi_Update(void) {
int i;
if(!WifiData) return;
WifiData->random ^=(W_RANDOM ^ (W_RANDOM<<11) ^ (W_RANDOM<<22));
@@ -1180,7 +1180,7 @@ int Wifi_SendOpenSystemAuthPacket() {
return Wifi_TxQueue((u16 *)data, i+6);
}
int Wifi_SendSharedKeyAuthPacket() {
int Wifi_SendSharedKeyAuthPacket(void) {
// max size is 12+24+4+6 = 46
u8 data[64];
int i;

View File

@@ -74,7 +74,7 @@ extern volatile Wifi_MainStruct * WifiData;
// Wifi Sync Handler function: Callback function that is called when the arm9 needs to be told to synchronize with new fifo data.
// If this callback is used (see Wifi_SetSyncHandler()), it should send a message via the fifo to the arm9, which will call Wifi_Sync() on arm9.
typedef void (*WifiSyncHandler)();
typedef void (*WifiSyncHandler)(void);
#ifdef __cplusplus
@@ -84,7 +84,7 @@ extern "C" {
extern void Read_Flash(int address, char * destination, int length);
extern void InitFlashData();
extern void InitFlashData(void);
extern int ReadFlashByte(int address);
extern int ReadFlashHWord(int address);
extern int ReadFlashBytes(int address, int numbytes);
@@ -93,38 +93,38 @@ extern int Wifi_BBRead(int a);
extern int Wifi_BBWrite(int a, int b);
extern void Wifi_RFWrite(int writedata);
extern void Wifi_RFInit();
extern void Wifi_BBInit();
extern void Wifi_WakeUp();
extern void Wifi_Shutdown();
extern void Wifi_MacInit();
extern void Wifi_Interrupt();
extern void Wifi_Update();
extern void Wifi_RFInit(void);
extern void Wifi_BBInit(void);
extern void Wifi_WakeUp(void);
extern void Wifi_Shutdown(void);
extern void Wifi_MacInit(void);
extern void Wifi_Interrupt(void);
extern void Wifi_Update(void);
extern void Wifi_CopyMacAddr(volatile void * dest, volatile void * src);
extern int Wifi_CmpMacAddr(volatile void * mac1, volatile void * mac2);
extern void Wifi_Init(u32 WifiData);
extern void Wifi_Deinit();
extern void Wifi_Start();
extern void Wifi_Stop();
extern void Wifi_Deinit(void);
extern void Wifi_Start(void);
extern void Wifi_Stop(void);
extern void Wifi_SetChannel(int channel);
extern void Wifi_SetWepKey(void * wepkey);
extern void Wifi_SetWepMode(int wepmode);
extern void Wifi_SetBeaconPeriod(int beacon_period);
extern void Wifi_SetMode(int wifimode);
extern void Wifi_SetPreambleType(int preamble_type);
extern void Wifi_TxSetup();
extern void Wifi_RxSetup();
extern void Wifi_DisableTempPowerSave();
extern void Wifi_TxSetup(void);
extern void Wifi_RxSetup(void);
extern void Wifi_DisableTempPowerSave(void);
extern int Wifi_SendOpenSystemAuthPacket();
extern int Wifi_SendAssocPacket();
extern int Wifi_SendNullFrame();
extern int Wifi_SendPSPollFrame();
extern int Wifi_SendOpenSystemAuthPacket(void);
extern int Wifi_SendAssocPacket(void);
extern int Wifi_SendNullFrame(void);
extern int Wifi_SendPSPollFrame(void);
extern int Wifi_ProcessReceivedFrame(int macbase, int framelen);
extern void Wifi_Sync();
extern void Wifi_Sync(void);
extern void Wifi_SetSyncHandler(WifiSyncHandler sh);

View File

@@ -24,6 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#include <unistd.h>
#include <nds.h>
#include "dsregs.h"

View File

@@ -96,7 +96,7 @@ extern "C" {
/*---------------------------------------------------------------------------------
Read a byte from the microphone
---------------------------------------------------------------------------------*/
u8 MIC_ReadData();
u8 MIC_ReadData(void);
/*---------------------------------------------------------------------------------
Fill the buffer with data from the microphone. The buffer will be
@@ -108,17 +108,17 @@ void StartRecording(u8* buffer, int length);
/*---------------------------------------------------------------------------------
Stop recording data, and return the length of data recorded.
---------------------------------------------------------------------------------*/
int StopRecording();
int StopRecording(void);
/* This must be called during IRQ_TIMER0 */
void ProcessMicrophoneTimerIRQ();
void ProcessMicrophoneTimerIRQ(void);
void PM_SetAmp(u8 control);
//---------------------------------------------------------------------------------
// Turn the microphone on
//---------------------------------------------------------------------------------
static inline void MIC_On() {
static inline void MIC_On(void) {
//---------------------------------------------------------------------------------
PM_SetAmp(PM_AMP_ON);
}
@@ -127,7 +127,7 @@ static inline void MIC_On() {
//---------------------------------------------------------------------------------
// Turn the microphone off
//---------------------------------------------------------------------------------
static inline void MIC_Off() {
static inline void MIC_Off(void) {
//---------------------------------------------------------------------------------
PM_SetAmp(PM_AMP_OFF);
}

View File

@@ -130,7 +130,7 @@ void rtcGetData(uint8 * data, uint32 size);
void BCDToInteger(uint8 * data, uint32 length);
void integerToBCD(uint8 * data, uint32 length);
void initClockIRQ();
void initClockIRQ(void);
#ifdef __cplusplus
}

View File

@@ -141,7 +141,7 @@
static inline
void SerialWaitBusy() {
void SerialWaitBusy(void) {
while (REG_SPICNT & SPI_BUSY)
swiDelay(1);
}

View File

@@ -57,7 +57,7 @@ extern "C" {
touchPosition touchReadXY();
touchPosition touchReadXY(void);
uint16 touchRead(uint32 command);
uint32 touchReadTemperature(int * t1, int * t2);

View File

@@ -215,7 +215,7 @@ void rtcSetTime(uint8 * time) {
}
//---------------------------------------------------------------------------------
void syncRTC() {
void syncRTC(void) {
//---------------------------------------------------------------------------------
if (++IPC->time.rtc.seconds == 60 ) {
IPC->time.rtc.seconds = 0;

View File

@@ -42,7 +42,7 @@ static u8 range = 20;
static u8 min_range = 20;
//---------------------------------------------------------------------------------
u8 CheckStylus(){
u8 CheckStylus(void){
//---------------------------------------------------------------------------------
SerialWaitBusy();

View File

@@ -65,7 +65,7 @@ nds_rtc_get_time (int minor, rtems_time_of_day * time)
*/
int
nds_rtc_set_time (int minor, rtems_time_of_day * time)
nds_rtc_set_time (int minor, const rtems_time_of_day * time)
{
return -1;
}