Skip to content

Commit dac96b2

Browse files
committed
FIX: few additional castings to prevent compilation warnings
1 parent 253769f commit dac96b2

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

src/core/d-print.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
*/
3838

3939
#include "sys-core.h"
40+
#include <wchar.h>
4041

4142
static REBREQ *Req_SIO;
4243

@@ -226,7 +227,7 @@ static REBREQ *Req_SIO;
226227
if (Trace_Limit > 0) {
227228
if (Trace_Buffer->tail >= Trace_Limit)
228229
Remove_Series(Trace_Buffer, 0, 2000);
229-
if (len == UNKNOWN) len = (REBINT)(uni ? wcslen(up) : LEN_BYTES(bp));
230+
if (len == UNKNOWN) len = (REBINT)(uni ? wcslen((const wchar_t*)up) : LEN_BYTES(bp));
230231
// !!! account for unicode!
231232
for (; len > 0; len--) {
232233
uc = uni ? *up++ : *bp++;

src/core/s-file.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
***********************************************************************/
2929

3030
#include "sys-core.h"
31+
#include <wchar.h>
3132

3233
#define FN_PAD 2 // pad file name len for adding /, /*, and /?
3334

src/core/s-unicode.c

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
------------------------------------------------------------------------ */
112112

113113
#include "sys-core.h"
114+
#include <wchar.h>
114115

115116

116117
/* ---------------------------------------------------------------------

src/core/t-date.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462

463463
if (!IS_END(arg)) return FALSE;
464464

465-
Normalize_Time(&secs, &day);
465+
Normalize_Time(&secs, (REBINT*)&day);
466466
date = Normalize_Date(day, month, year, tz);
467467

468468
VAL_SET(val, REB_DATE);

src/core/t-integer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
break;
120120

121121
case A_MULTIPLY:
122-
if (REB_I64_MUL_OF(num, arg, &p)) Trap0(RE_OVERFLOW);
122+
if (REB_I64_MUL_OF(num, arg, (REBI64*)&p)) Trap0(RE_OVERFLOW);
123123
num = p;
124124
break;
125125

src/os/posix/host-lib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ static inline REBOOL Open_Pipe_Fails(int pipefd[2]) {
986986
argv_new[argc + 2] = NULL;
987987
execvp(sh, (char* const*)argv_new);
988988
} else {
989-
execvp(argv[0], argv);
989+
execvp(argv[0], (char* const*)argv);
990990
}
991991
child_error:
992992
if(write(info_pipe[W], &errno, sizeof(errno)) == -1) {

0 commit comments

Comments
 (0)