ci: enable CI_BUILD on windows (#21557)

This will ensure warnings are treated as errors when using MSVC.

Also fix const correctness warnings. The warnings in mbyte.c are false
positives that triggers this warning on MSVC v19.32 and lower, which our
CI still use. The (void *) casts can be removed once the CI MSVC version
has been upgraded to v19.33 or higher.
This commit is contained in:
dundargoc
2023-01-18 20:23:46 +01:00
committed by GitHub
parent 92a46727f7
commit 42d5142367
4 changed files with 16 additions and 13 deletions

View File

@@ -3006,7 +3006,7 @@ static int do_more_prompt(int typed_char)
#if defined(MSWIN)
/// Headless (no UI) error message handler.
static void do_msg(char *str, bool errmsg)
static void do_msg(const char *str, bool errmsg)
{
static bool did_err = false;
assert(str != NULL);
@@ -3026,13 +3026,13 @@ static void do_msg(char *str, bool errmsg)
}
}
void os_errmsg(char *str)
void os_errmsg(const char *str)
{
do_msg(str, true);
}
/// Headless (no UI) message handler.
void os_msg(char *str)
void os_msg(const char *str)
{
do_msg(str, false);
}