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 2016-09-05 16:37:01 +01:00 committed by Cesanta Bot
parent 5f93f7162f
commit 2a541175b5
12 changed files with 20 additions and 20 deletions

View File

@ -3,7 +3,7 @@ title: "mg_time()"
decl_name: "mg_time"
symbol_kind: "func"
signature: |
double mg_time();
double mg_time(void);
---
A sub-second precision version of time().

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) {

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) {

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);

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) {

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_ */

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;

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;

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];

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);

View File

@ -672,7 +672,7 @@ typedef int cs_dirent_dummy;
#include <windows.h>
#endif
double cs_time() {
double cs_time(void) {
double now;
#ifndef _WIN32
struct timeval tv;
@ -2721,7 +2721,7 @@ struct mg_connection *mg_add_sock(struct mg_mgr *s, sock_t sock,
return mg_add_sock_opt(s, sock, callback, opts);
}
double mg_time() {
double mg_time(void) {
return cs_time();
}
#ifdef MG_MODULE_LINES
@ -10408,7 +10408,7 @@ int mkdir(const char *path, mode_t mode) {
}
#endif
int sl_fs_init() {
int sl_fs_init(void) {
int ret = 1;
#ifdef __TI_COMPILER_VERSION__
#ifdef MG_FS_SLFS

View File

@ -788,7 +788,7 @@ bool mg_start_task(int priority, int stack_size, mg_init_cb mg_init);
void mg_run_in_task(void (*cb)(struct mg_mgr *mgr, void *arg), void *cb_arg);
int sl_fs_init();
int sl_fs_init(void);
void sl_restart_cb(struct mg_mgr *mgr);
@ -814,7 +814,7 @@ extern "C" {
#endif /* __cplusplus */
/* Sub-second granularity time(). */
double cs_time();
double cs_time(void);
#ifdef __cplusplus
}
@ -1631,7 +1631,7 @@ double mg_set_timer(struct mg_connection *c, double timestamp);
/*
* A sub-second precision version of time().
*/
double mg_time();
double mg_time(void);
#ifdef __cplusplus
}