mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
configure: Build with -Wwrite-strings.
libs/vkd3d-shader/hlsl.c: In function ‘declare_predefined_types’: libs/vkd3d-shader/hlsl.c:3408:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] {"technique", 9}, ^~~~~~~~~~~ ... programs/vkd3d-compiler/main.c: In function ‘parse_formatting’: programs/vkd3d-compiler/main.c:303:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] {"colour", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR}, ^~~~~~~~ ... macOS tigetstr() takes a non-const char *, so account for that as well.
This commit is contained in:
parent
7029d821be
commit
d65f331efc
Notes:
Alexandre Julliard
2024-02-22 23:05:00 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/668
@ -70,6 +70,7 @@ AS_IF([test "x${GCC}" = "xyes"],
|
|||||||
VKD3D_CHECK_CFLAGS([-Wtype-limits])
|
VKD3D_CHECK_CFLAGS([-Wtype-limits])
|
||||||
VKD3D_CHECK_CFLAGS([-Wunused-but-set-parameter])
|
VKD3D_CHECK_CFLAGS([-Wunused-but-set-parameter])
|
||||||
VKD3D_CHECK_CFLAGS([-Wvla])
|
VKD3D_CHECK_CFLAGS([-Wvla])
|
||||||
|
VKD3D_CHECK_CFLAGS([-Wwrite-strings])
|
||||||
VKD3D_CHECK_CFLAGS([-Wl,--no-undefined])])
|
VKD3D_CHECK_CFLAGS([-Wl,--no-undefined])])
|
||||||
|
|
||||||
dnl Check for cross compilers
|
dnl Check for cross compilers
|
||||||
|
@ -3403,7 +3403,7 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
|
|||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
unsigned int version;
|
unsigned int version;
|
||||||
}
|
}
|
||||||
technique_types[] =
|
technique_types[] =
|
||||||
|
@ -295,7 +295,7 @@ static bool parse_formatting(uint32_t *formatting, bool *colour, char *arg)
|
|||||||
{
|
{
|
||||||
static const struct formatting_option
|
static const struct formatting_option
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
enum vkd3d_shader_compile_option_formatting_flags value;
|
enum vkd3d_shader_compile_option_formatting_flags value;
|
||||||
}
|
}
|
||||||
opts[] =
|
opts[] =
|
||||||
@ -694,7 +694,7 @@ static bool has_colour(FILE *f)
|
|||||||
setupterm(NULL, fileno(f), &ret);
|
setupterm(NULL, fileno(f), &ret);
|
||||||
if (ret != 1)
|
if (ret != 1)
|
||||||
return false;
|
return false;
|
||||||
supported = !!tigetstr("setaf");
|
supported = !!tigetstr((char *)"setaf");
|
||||||
del_curterm(cur_term);
|
del_curterm(cur_term);
|
||||||
|
|
||||||
return supported;
|
return supported;
|
||||||
|
@ -71,7 +71,7 @@ static bool has_colour(void)
|
|||||||
setupterm(NULL, fileno(stdout), &ret);
|
setupterm(NULL, fileno(stdout), &ret);
|
||||||
if (ret != 1)
|
if (ret != 1)
|
||||||
return false;
|
return false;
|
||||||
supported = !!tigetstr("setaf");
|
supported = !!tigetstr((char *)"setaf");
|
||||||
del_curterm(cur_term);
|
del_curterm(cur_term);
|
||||||
|
|
||||||
return supported;
|
return supported;
|
||||||
|
Loading…
Reference in New Issue
Block a user