Use void arguments list consistently in C code

On my way, fixed a couple of cases where we had `()` in the header, and
non-empty argument list in the source file.

PUBLISHED_FROM=5519526cf84e2bbd425a726fcc112fea1a95cbf1
This commit is contained in:
Dmitry Frank authored and Cesanta Bot committed 2016-09-05 15:51:19 +00:00
1 parent 5f93f7162f
commit 2a541175b5
12 files changed
+20 -20

No files matched your search

+3 -3
View File
@@ -186,7 +186,7 @@ static void mg_init(struct mg_mgr *mgr) {
extern void (*const g_pfnVectors[])(void);
#endif
int main() {
int main(void) {
#ifndef USE_TIRTOS
MAP_IntVTableBaseSet((unsigned long) &g_pfnVectors[0]);
#endif
@@ -223,10 +223,10 @@ int main() {
}
/* These are FreeRTOS hooks for various life situations. */
void vApplicationMallocFailedHook() {
void vApplicationMallocFailedHook(void) {
}
void vApplicationIdleHook() {
void vApplicationIdleHook(void) {
}
void vApplicationStackOverflowHook(OsiTaskHandle *th, signed char *tn) {
+1 -1
View File
@@ -47,7 +47,7 @@ void data_init_sensors(int tmp006_addr, int bm222_addr) {
}
}
void data_collect() {
void data_collect(void) {
double volt = tmp006_read_sensor_voltage(s_tmp006_addr);
double temp = tmp006_read_die_temp(s_tmp006_addr);
if (volt != TMP006_INVALID_READING && temp != TMP006_INVALID_READING) {
+1 -1
View File
@@ -8,7 +8,7 @@
#include "mongoose.h"
void data_collect();
void data_collect(void);
void data_init_sensors(int tmp006_addr, int bm222_addr);
void data_conn_handler(struct mg_connection *nc, int ev, void *p);
+3 -3
View File
@@ -222,7 +222,7 @@ static void mg_init(struct mg_mgr *mgr) {
extern void (*const g_pfnVectors[])(void);
#endif
int main() {
int main(void) {
#ifndef USE_TIRTOS
MAP_IntVTableBaseSet((unsigned long) &g_pfnVectors[0]);
#endif
@@ -274,10 +274,10 @@ int main() {
}
/* These are FreeRTOS hooks for various life situations. */
void vApplicationMallocFailedHook() {
void vApplicationMallocFailedHook(void) {
}
void vApplicationIdleHook() {
void vApplicationIdleHook(void) {
}
void vApplicationStackOverflowHook(OsiTaskHandle *th, signed char *tn) {
+1 -1
View File
@@ -10,6 +10,6 @@
bool wifi_setup_ap(const char *ssid, const char *pass, int channel);
bool wifi_setup_sta(const char *ssid, const char *pass);
void stop_nwp();
void stop_nwp(void);
#endif /* CS_MONGOOSE_EXAMPLES_CC3200_WIFI_H_ */
+1 -1
View File
@@ -54,7 +54,7 @@ void ev_handler(struct mg_connection *nc, int ev, void *p) {
}
}
void setup_ap() {
void setup_ap(void) {
int off = 0;
struct ip_info info;
struct softap_config cfg;
+1 -1
View File
@@ -42,7 +42,7 @@ static void coap_handler(struct mg_connection *nc, int ev, void *p) {
}
}
int main() {
int main(void) {
struct mg_mgr mgr;
struct mg_connection *nc;
+1 -1
View File
@@ -183,7 +183,7 @@ static void logout_handler(struct mg_connection *nc, int ev, void *p) {
}
/* Cleans up sessions that have been idle for too long. */
void check_sessions() {
void check_sessions(void) {
double threshold = mg_time() - SESSION_TTL;
for (int i = 0; i < NUM_SESSIONS; i++) {
struct session *s = &s_sessions[i];
+1 -1
View File
@@ -40,7 +40,7 @@ static void event_handler(struct mg_connection *nc, int event, void *data) {
}
}
int main() {
int main(void) {
struct mg_mgr mgr;
mg_mgr_init(&mgr, NULL);