diff --git a/configure.ac b/configure.ac index e2376b0d..caceb445 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,7 @@ AS_IF([test "x${GCC}" = "xyes"], VKD3D_CHECK_CFLAGS([-Wtype-limits]) VKD3D_CHECK_CFLAGS([-Wunused-but-set-parameter]) VKD3D_CHECK_CFLAGS([-Wvla]) + VKD3D_CHECK_CFLAGS([-Wwrite-strings]) VKD3D_CHECK_CFLAGS([-Wl,--no-undefined])]) dnl Check for cross compilers diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 978c414d..0e75edd4 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -3403,7 +3403,7 @@ static void declare_predefined_types(struct hlsl_ctx *ctx) static const struct { - char *name; + const char *name; unsigned int version; } technique_types[] = diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index 3fa54aad..fdb1cade 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -295,7 +295,7 @@ static bool parse_formatting(uint32_t *formatting, bool *colour, char *arg) { static const struct formatting_option { - char *name; + const char *name; enum vkd3d_shader_compile_option_formatting_flags value; } opts[] = @@ -694,7 +694,7 @@ static bool has_colour(FILE *f) setupterm(NULL, fileno(f), &ret); if (ret != 1) return false; - supported = !!tigetstr("setaf"); + supported = !!tigetstr((char *)"setaf"); del_curterm(cur_term); return supported; diff --git a/programs/vkd3d-dxbc/main.c b/programs/vkd3d-dxbc/main.c index b6786b71..e76bcb63 100644 --- a/programs/vkd3d-dxbc/main.c +++ b/programs/vkd3d-dxbc/main.c @@ -71,7 +71,7 @@ static bool has_colour(void) setupterm(NULL, fileno(stdout), &ret); if (ret != 1) return false; - supported = !!tigetstr("setaf"); + supported = !!tigetstr((char *)"setaf"); del_curterm(cur_term); return supported;