Skip to content

Commit 472b2c7

Browse files
committed
FIX: better fix for previous (warning) fix (as Clang requires char ** for second parameter of main function)
1 parent 2864f60 commit 472b2c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/os/host-main.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -235,18 +235,18 @@ int APIENTRY WinMain(HINSTANCE inst, HINSTANCE prior, LPSTR cmd, int show) {
235235
REBCHR **argv;
236236
App_Instance = inst;
237237
#else
238-
int main(int argc, REBCHR **argv) {
238+
int main(int argc, char **argv) {
239239
// Retrieves the window handle used by the console associated with the calling process
240240
HWND hwndC = GetConsoleWindow();
241241
// Then we could just get the HINSTANCE:
242242
App_Instance = GetModuleHandle(0); // HMODULE=HINSTANCE
243243
#endif
244244
// Fetch the win32 unicoded program arguments:
245-
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
245+
(LPWSTR*)argv = CommandLineToArgvW(GetCommandLineW(), &argc);
246246
// Use title string as defined in resources file (.rc) with hardcoded ID 101
247247
LoadStringW(App_Instance, 101, App_Title, MAX_TITLE_LENGTH);
248248
#else //non Windows platforms
249-
int main(int argc, REBCHR **argv) {
249+
int main(int argc, char **argv) {
250250
#endif
251251
REBYTE vers[8];
252252
REBINT n;
@@ -257,7 +257,7 @@ int main(int argc, REBCHR **argv) {
257257

258258
Host_Lib = &Host_Lib_Init;
259259

260-
Parse_Args(argc, argv, &Main_Args);
260+
Parse_Args(argc, (REBCHR **)argv, &Main_Args);
261261

262262
vers[0] = 5; // len
263263
RL_Version(&vers[0]);

0 commit comments

Comments
 (0)