From: Kees van Reeuwijk Date: Thu, 1 Jul 2010 22:23:25 +0000 (+0000) Subject: Convert a few main() functions to a form that the clang compiler likes. X-Git-Tag: v3.1.8~296 X-Git-Url: http://zhaoyanbai.com/repos/doc/roff.7.html?a=commitdiff_plain;h=630f566d3f52838a43a73fd94ac4f5482d518a8e;p=minix.git Convert a few main() functions to a form that the clang compiler likes. --- diff --git a/drivers/audio/common/audio_fw.c b/drivers/audio/common/audio_fw.c index 5ba67d6cc..abf3872ae 100644 --- a/drivers/audio/common/audio_fw.c +++ b/drivers/audio/common/audio_fw.c @@ -83,8 +83,8 @@ EXTERN _PROTOTYPE( int sef_cb_lu_state_isvalid, (int state) ); EXTERN _PROTOTYPE( void sef_cb_lu_state_dump, (int state) ); PUBLIC int is_status_msg_expected = FALSE; -PUBLIC void main(void) -{ +PUBLIC int main(int argc, char *argv[]) +{ int r, caller; message mess, repl_mess; int ipc_status; @@ -174,6 +174,7 @@ PUBLIC void main(void) /* Should not be here. Just continue. */ } + return 1; } /*===========================================================================* diff --git a/drivers/audio/common/audio_fw.h b/drivers/audio/common/audio_fw.h index b7570ca40..e3095cdfe 100644 --- a/drivers/audio/common/audio_fw.h +++ b/drivers/audio/common/audio_fw.h @@ -18,9 +18,6 @@ #define error printf - -_PROTOTYPE( void main, (void) ); - _PROTOTYPE( int drv_init, (void) ); _PROTOTYPE( int drv_init_hw, (void) ); _PROTOTYPE( int drv_reset, (void) ); diff --git a/servers/inet/inet.c b/servers/inet/inet.c index 66ac49d9c..6a582369c 100644 --- a/servers/inet/inet.c +++ b/servers/inet/inet.c @@ -80,8 +80,6 @@ extern int inet_buf_debug; u32_t system_hz; #endif -_PROTOTYPE( void main, (void) ); - FORWARD _PROTOTYPE( void nw_conf, (void) ); FORWARD _PROTOTYPE( void nw_init, (void) ); FORWARD _PROTOTYPE( void ds_event, (void) ); @@ -90,7 +88,7 @@ FORWARD _PROTOTYPE( void ds_event, (void) ); FORWARD _PROTOTYPE( void sef_local_startup, (void) ); FORWARD _PROTOTYPE( int sef_cb_init_fresh, (int type, sef_init_info_t *info) ); -PUBLIC void main() +PUBLIC int main(int argc, char *argv[]) { mq_t *mq; int ipc_status; @@ -182,6 +180,7 @@ PUBLIC void main() } } ip_panic(("task is not allowed to terminate")); + return 1; } /*===========================================================================*