From d273f4a3d303ee8d2007911086f32b9378b87df3 Mon Sep 17 00:00:00 2001 From: Oldes Date: Wed, 2 Jan 2019 12:38:05 +0100 Subject: [PATCH] FIX: fixing more compiler warnings --- src/core/b-init.c | 10 +++++----- src/core/c-do.c | 2 +- src/core/c-error.c | 4 ++-- src/core/c-frame.c | 2 +- src/core/p-event.c | 2 +- src/core/t-tuple.c | 2 +- src/os/dev-net.c | 2 +- src/os/host-main.c | 2 +- src/os/posix/dev-file.c | 4 ++-- src/os/posix/dev-stdio.c | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/core/b-init.c b/src/core/b-init.c index a05103d73b..b41b54f6c5 100644 --- a/src/core/b-init.c +++ b/src/core/b-init.c @@ -51,7 +51,7 @@ extern const REBYTE Str_Banner[]; /*********************************************************************** ** -*/ static void Assert_Basics() +*/ static void Assert_Basics(void) /* ***********************************************************************/ { @@ -434,7 +434,7 @@ extern const REBYTE Str_Banner[]; /*********************************************************************** ** -*/ void Init_UType_Proto() +*/ void Init_UType_Proto(void) /* ** Create prototype func object for UTypes. ** @@ -560,7 +560,7 @@ extern const REBYTE Str_Banner[]; /*********************************************************************** ** -*/ static void Init_System_Object() +*/ static void Init_System_Object(void) /* ** The system object is defined in boot.r. ** @@ -627,7 +627,7 @@ extern const REBYTE Str_Banner[]; /*********************************************************************** ** -*/ static void Init_Contexts_Object() +*/ static void Init_Contexts_Object(void) /* ***********************************************************************/ { @@ -715,7 +715,7 @@ extern const REBYTE Str_Banner[]; /*********************************************************************** ** -*/ static void Init_Codecs() +*/ static void Init_Codecs(void) /* ***********************************************************************/ { diff --git a/src/core/c-do.c b/src/core/c-do.c index 62266c064e..b3f02feba5 100644 --- a/src/core/c-do.c +++ b/src/core/c-do.c @@ -135,7 +135,7 @@ static REBVAL *Func_Word(REBINT dsf) /*********************************************************************** ** -*/ REBINT Eval_Depth() +*/ REBINT Eval_Depth(void) /* ***********************************************************************/ { diff --git a/src/core/c-error.c b/src/core/c-error.c index e936e0591a..3e033e570d 100644 --- a/src/core/c-error.c +++ b/src/core/c-error.c @@ -206,7 +206,7 @@ static REBOL_STATE Top_State; // Boot var: holds error state during boot /*********************************************************************** ** -*/ void Trap_Stack() +*/ void Trap_Stack(void) /* ***********************************************************************/ { @@ -222,7 +222,7 @@ static REBOL_STATE Top_State; // Boot var: holds error state during boot /*********************************************************************** ** -*/ REBCNT Stack_Depth() +*/ REBCNT Stack_Depth(void) /* ***********************************************************************/ { diff --git a/src/core/c-frame.c b/src/core/c-frame.c index 4649f82c20..64e104bb84 100644 --- a/src/core/c-frame.c +++ b/src/core/c-frame.c @@ -90,7 +90,7 @@ /*********************************************************************** ** -*/ void Check_Bind_Table() +*/ void Check_Bind_Table(void) /* ***********************************************************************/ { diff --git a/src/core/p-event.c b/src/core/p-event.c index 0a32a1f162..32e330bf71 100644 --- a/src/core/p-event.c +++ b/src/core/p-event.c @@ -61,7 +61,7 @@ REBREQ *req; //!!! move this global /*********************************************************************** ** -*/ REBVAL *Append_Event() +*/ REBVAL *Append_Event(void) /* ** Append an event to the end of the current event port queue. ** Return a pointer to the event value. diff --git a/src/core/t-tuple.c b/src/core/t-tuple.c index 7368ed954c..9a5089f077 100644 --- a/src/core/t-tuple.c +++ b/src/core/t-tuple.c @@ -188,7 +188,7 @@ REBVAL *arg; REBYTE *vp = NULL; REBYTE *ap = NULL; - REBINT len; + REBINT len = 0; REBINT alen; REBINT v; REBINT a; diff --git a/src/os/dev-net.c b/src/os/dev-net.c index fae5fedc2c..7a9a94b22b 100644 --- a/src/os/dev-net.c +++ b/src/os/dev-net.c @@ -214,7 +214,7 @@ static REBOOL Nonblocking_Mode(SOCKET sock) return DR_ERROR; } - sock->socket = result; + sock->socket = (int)result; SET_FLAG(sock->state, RSM_OPEN); // Set socket to non-blocking async mode: diff --git a/src/os/host-main.c b/src/os/host-main.c index 16a47383f8..7d676a6288 100644 --- a/src/os/host-main.c +++ b/src/os/host-main.c @@ -86,7 +86,7 @@ extern void Init_Ext_Test(void); // see: host-ext-test.c extern void Open_StdIO(void); extern void Close_StdIO(void); extern void Put_Str(REBYTE *buf); -extern REBYTE *Get_Str(); +extern REBYTE *Get_Str(void); void Host_Crash(char *reason) { OS_Crash(cb_cast("REBOL Host Failure"), cb_cast(reason)); diff --git a/src/os/posix/dev-file.c b/src/os/posix/dev-file.c index 095090b034..3f40cb7810 100644 --- a/src/os/posix/dev-file.c +++ b/src/os/posix/dev-file.c @@ -318,7 +318,7 @@ static int Get_File_Info(REBREQ *file) // Fetch file size (if fails, then size is assumed zero): if (fstat(h, &info) == 0) { file->file.size = info.st_size; - file->file.time.l = (long)(info.st_mtime); + file->file.time.l = (i32)(info.st_mtime); } file->id = h; @@ -417,7 +417,7 @@ static int Get_File_Info(REBREQ *file) else file->error = -RFE_BAD_WRITE; return DR_ERROR; } else { - file->actual = num_bytes; + file->actual = (u32)num_bytes; } return DR_DONE; diff --git a/src/os/posix/dev-stdio.c b/src/os/posix/dev-stdio.c index 42f726f661..0b49d83133 100644 --- a/src/os/posix/dev-stdio.c +++ b/src/os/posix/dev-stdio.c @@ -206,7 +206,7 @@ static void Close_Stdio(void) //FLUSH(); //} - req->actual = total; + req->actual = (u32)total; } if (Std_Echo) {