Skip to content

Commit ce9cc7a

Browse files
fix: pointer sign warnings
1 parent 6571d32 commit ce9cc7a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

input/ipc-win.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static MP_THREAD_VOID client_thread(void *p)
205205
char buf[4096];
206206
HANDLE wakeup_event = CreateEventW(NULL, TRUE, FALSE, NULL);
207207
OVERLAPPED ol = { .hEvent = CreateEventW(NULL, TRUE, TRUE, NULL) };
208-
bstr client_msg = { talloc_strdup(NULL, ""), 0 };
208+
bstr client_msg = { (unsigned char *)talloc_strdup(NULL, ""), 0 };
209209
DWORD ioerr = 0;
210210
DWORD r;
211211

@@ -269,7 +269,7 @@ static MP_THREAD_VOID client_thread(void *p)
269269
goto done;
270270
}
271271

272-
bstr_xappend(NULL, &client_msg, (bstr){buf, r});
272+
bstr_xappend(NULL, &client_msg, (bstr){(unsigned char *)buf, r});
273273
while (bstrchr(client_msg, '\n') != -1) {
274274
char *reply_msg = mp_ipc_consume_next_command(arg->client,
275275
NULL, &client_msg);

osdep/subprocess-win.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void write_arg(bstr *cmdline, char *arg)
6565
break;
6666
case '"':
6767
// Write the argument up to the point before the quote
68-
bstr_xappend(NULL, cmdline, (struct bstr){arg, pos});
68+
bstr_xappend(NULL, cmdline, (struct bstr){(unsigned char *)arg, pos});
6969
arg += pos;
7070
pos = 0;
7171

@@ -107,7 +107,7 @@ static wchar_t *write_cmdline(void *ctx, char *argv0, char **args)
107107
}
108108
}
109109

110-
wchar_t *wcmdline = mp_from_utf8(ctx, cmdline.start);
110+
wchar_t *wcmdline = mp_from_utf8(ctx, (char *)cmdline.start);
111111
talloc_free(cmdline.start);
112112
return wcmdline;
113113
}
@@ -382,7 +382,7 @@ void mp_subprocess2(struct mp_subprocess_opts *opts,
382382
// https://www.catch22.net/tuts/undocumented-createprocess>
383383
si.StartupInfo.cbReserved2 = sizeof(int) + crt_fd_count * (1 + sizeof(intptr_t));
384384
si.StartupInfo.lpReserved2 = talloc_size(tmp, si.StartupInfo.cbReserved2);
385-
char *crt_buf_flags = si.StartupInfo.lpReserved2 + sizeof(int);
385+
char *crt_buf_flags = (char *)si.StartupInfo.lpReserved2 + sizeof(int);
386386
char *crt_buf_hndls = crt_buf_flags + crt_fd_count;
387387

388388
memcpy(si.StartupInfo.lpReserved2, &crt_fd_count, sizeof(int));

0 commit comments

Comments
 (0)