Skip to content

Commit

Permalink
fix(Build): Fix -Wstrict-prototypes warnings (#954)
Browse files Browse the repository at this point in the history
Co-authored-by: Lorne Smith <[email protected]>
Co-authored-by: Jake-Carter <[email protected]>
  • Loading branch information
3 people authored Mar 20, 2024
1 parent 15b4f34 commit bd92bea
Show file tree
Hide file tree
Showing 387 changed files with 844 additions and 839 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ uint32_t student_num;
* Main f32 test function. It returns maximum marks secured and student number
* ------------------------------------------------------------------------------- */

int main()
int main(void)
{
#ifndef USE_STATIC_INIT

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32520/DMA/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void memCpyComplete(void *dest)
flag++;
}

void DMA0_IRQHandler()
void DMA0_IRQHandler(void)
{
MXC_DMA_Handler();
}
Expand Down
10 changes: 5 additions & 5 deletions Examples/MAX32520/Flash/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ volatile uint32_t isr_flags;

//******************************************************************************
int button_pressed = 0;
void button_handler()
void button_handler(void)
{
button_pressed = 1;
}
Expand Down Expand Up @@ -130,7 +130,7 @@ void setup_irqs(void)
isr_cnt = 0;
}

int write_test_pattern()
int write_test_pattern(void)
{
int err;
// A flash address must be in the erased state before writing to it, because the
Expand Down Expand Up @@ -172,7 +172,7 @@ int write_test_pattern()
return err;
}

int validate_test_pattern()
int validate_test_pattern(void)
{
int err = 0;

Expand All @@ -192,7 +192,7 @@ int validate_test_pattern()
return err;
}

int validate_test_pattern_erase()
int validate_test_pattern_erase(void)
{
int err = 0;

Expand All @@ -210,7 +210,7 @@ int validate_test_pattern_erase()
return err;
}

int erase_magic()
int erase_magic(void)
{
/*
To modify a location in flash that has already been written to,
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32520/Hello_World_Cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class LED {
int blink_count;
};

int main()
int main(void)
{
LED led = LED(0);

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32520/I2C_MNGR/i2c_mngr/i2c_mngr.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef struct {
static i2c_txn_mngr_t s_mngr;

/******************************************************************************/
int I2C_MNGR_Init()
int I2C_MNGR_Init(void)
{
s_mngr.inst0 = MXC_I2C0;

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32520/I2C_MNGR/i2c_mngr/i2c_mngr.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ typedef struct {
* @brief Initializes I2C transaction manager
* @return #E_NO_ERROR if succeeded, error code otherwise
*/
int I2C_MNGR_Init();
int I2C_MNGR_Init(void);

/*
* @brief Executes I2C transaction
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32520/I2C_SCAN/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
uint8_t counter = 0;

// *****************************************************************************
int main()
int main(void)
{
printf("\n******** I2C SLAVE ADDRESS SCANNER *********\n");
printf("\nThis example finds the addresses of any I2C Slave devices connected to the");
Expand Down
4 changes: 2 additions & 2 deletions Examples/MAX32520/SFE/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int Flash_CheckErased(uint32_t startaddr)
}

//******************************************************************************
void Flash_Write()
void Flash_Write(void)
{
int fail = 0;
int i = 0;
Expand Down Expand Up @@ -166,7 +166,7 @@ void Flash_InterruptEN(mxc_flc_regs_t *regs)
}

//******************************************************************************
void Flash_CommandCheck()
void Flash_CommandCheck(void)
{
static uint8_t isErased = 0;

Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32520/SFE_Host/sfe_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
mxc_spi_req_t master_req;

//******************************************************************************
void SFE_Reset()
void SFE_Reset(void)
{
uint8_t cmd = SFE_CMD_RST_EN;

Expand Down Expand Up @@ -481,7 +481,7 @@ void SFE_Read(uint8_t *rxdata, uint32_t length, uint32_t address, spi_width_t wi
}

// *****************************************************************************
void SFE_4ByteModeEnable()
void SFE_4ByteModeEnable(void)
{
uint8_t cmd = SFE_4BYTE_ENTER;

Expand Down Expand Up @@ -512,7 +512,7 @@ void SFE_4ByteModeEnable()
}

// *****************************************************************************
void SFE_4ByteModeDisable()
void SFE_4ByteModeDisable(void)
{
uint8_t cmd = SFE_4BYTE_EXIT;

Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32520/SFE_Host/sfe_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ typedef enum {
* @brief
*
*/
void SFE_Reset();
void SFE_Reset(void);

/**
* @brief
Expand Down Expand Up @@ -139,12 +139,12 @@ void SFE_Read(uint8_t *rxdata, uint32_t length, uint32_t address, spi_width_t wi
* @brief
*
*/
void SFE_4ByteModeEnable();
void SFE_4ByteModeEnable(void);

/**
* @brief
*
*/
void SFE_4ByteModeDisable();
void SFE_4ByteModeDisable(void);

#endif // EXAMPLES_MAX32520_SFE_HOST_SFE_HOST_H_
6 changes: 3 additions & 3 deletions Examples/MAX32520/TMR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

/***** Functions *****/

void PWMTimer()
void PWMTimer(void)
{
// Declare variables
mxc_tmr_cfg_t tmr; // to configure timer
Expand Down Expand Up @@ -98,14 +98,14 @@ void PWMTimer()
}

// Toggles GPIO when continuous timer repeats
void ContinuousTimerHandler()
void ContinuousTimerHandler(void)
{
// Clear interrupt
MXC_TMR_ClearFlags(CONT_TIMER);
MXC_GPIO_OutToggle(led_pin[1].port, led_pin[1].mask);
}

void ContinuousTimer()
void ContinuousTimer(void)
{
// Declare variables
mxc_tmr_cfg_t tmr;
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32520/Watchdog/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/***** Functions *****/

// *****************************************************************************
void watchdog_timeout_handler()
void watchdog_timeout_handler(void)
{
//get and clear flag
MXC_WDT_GetIntFlag(MXC_WDT0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ uint32_t student_num;
* Main f32 test function. It returns maximum marks secured and student number
* ------------------------------------------------------------------------------- */

int main()
int main(void)
{
#ifndef USE_STATIC_INIT

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/DMA/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void memCpyComplete(void *dest)
flag++;
}

void DMA0_IRQHandler()
void DMA0_IRQHandler(void)
{
MXC_DMA_Handler();
}
Expand Down
8 changes: 4 additions & 4 deletions Examples/MAX32650/Flash/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ volatile uint32_t isr_flags;
//******************************************************************************

int button_pressed = 0;
void button_handler()
void button_handler(void)
{
button_pressed = 1;
}
Expand Down Expand Up @@ -120,7 +120,7 @@ void setup_irqs(void)
isr_cnt = 0;
}

int write_test_pattern()
int write_test_pattern(void)
{
int err;
// A flash address must be in the erased state before writing to it, because the
Expand Down Expand Up @@ -162,7 +162,7 @@ int write_test_pattern()
return err;
}

int validate_test_pattern()
int validate_test_pattern(void)
{
int err = 0;

Expand All @@ -182,7 +182,7 @@ int validate_test_pattern()
return err;
}

int erase_magic()
int erase_magic(void)
{
/*
To modify a location in flash that has already been written to,
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/Hello_World_Cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class LED {
int blink_count;
};

int main()
int main(void)
{
LED led = LED(0);

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/I2C/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int verifyData(void)
}

// *****************************************************************************
int main()
int main(void)
{
printf("\n******** I2C Master-Slave Transaction Demo *********\n");
printf("\nThis example uses one I2C peripheral as a master to\n");
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/I2C_MNGR/i2c_mngr/i2c_mngr.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef struct {
static i2c_txn_mngr_t s_mngr;

/******************************************************************************/
int I2C_MNGR_Init()
int I2C_MNGR_Init(void)
{
s_mngr.inst0 = MXC_I2C0;
s_mngr.inst1 = MXC_I2C1;
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/I2C_MNGR/i2c_mngr/i2c_mngr.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ typedef struct {
* @brief Initializes I2C transaction manager
* @return #E_NO_ERROR if succeeded, error code otherwise
*/
int I2C_MNGR_Init();
int I2C_MNGR_Init(void);

/*
* @brief Executes I2C transaction
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/I2C_SCAN/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
/***** Globals *****/

// *****************************************************************************
int main()
int main(void)
{
int error;
uint8_t counter = 0;
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/I2S/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void dma_ctz_cb(int ch, int err)
}

/*****************************************************************/
int main()
int main(void)
{
int err;

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/Pulse_Train/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/***** Functions *****/

// *****************************************************************************
static void PB_Start_Stop_handler()
static void PB_Start_Stop_handler(void)
{
uint32_t enablePTMask;
for (int i = 0; i < 20000; i++) {}
Expand Down
4 changes: 2 additions & 2 deletions Examples/MAX32650/RTC/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ void RTC_IRQHandler(void)
}

volatile int buttonPressed = 0;
void buttonHandler()
void buttonHandler(void)
{
buttonPressed = 1;
}

void printTime()
void printTime(void)
{
int day, hr, min, err;
uint32_t sec, rtc_readout;
Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32650/RTC_Backup/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
void RTC_IRQHandler(void) {}

// *****************************************************************************
void rescheduleAlarm()
void rescheduleAlarm(void)
{
uint32_t time;
int flags = MXC_RTC_GetFlags();
Expand All @@ -86,7 +86,7 @@ void rescheduleAlarm()
}

// *****************************************************************************
void printTime()
void printTime(void)
{
int day, hr, min;
uint32_t sec;
Expand All @@ -107,7 +107,7 @@ void printTime()
}

// *****************************************************************************
int configureRTC()
int configureRTC(void)
{
printf("\n\n***************** RTC Wake from Backup Example *****************\n\n");
printf("The time-of-day alarm is set to wake the device every %d seconds.\n", TIME_OF_DAY_SEC);
Expand Down
14 changes: 7 additions & 7 deletions Examples/MAX32650/SDHC_FAT/include/sdhc_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ int sdhc_init(void);

void generateMessage(unsigned length);

int mount();
int mount(void);

int umount();
int umount(void);

int formatSDHC();
int formatSDHC(void);

int getSize();
int getSize(void);

int ls();
int ls(void);

int createFile(char *file_name, unsigned int length);

Expand All @@ -58,8 +58,8 @@ int cd(char *dir_name);

int deleteFile(char *file_name);

int example();
int example(void);

void waitCardInserted();
void waitCardInserted(void);

#endif // EXAMPLES_MAX32650_SDHC_FAT_INCLUDE_SDHC_EXAMPLE_H_
Loading

0 comments on commit bd92bea

Please sign in to comment.