From aa3087d1ed5a29146e6ae9e29810e5dcba6c4bbe Mon Sep 17 00:00:00 2001 From: Jag Raman Date: Fri, 13 May 2022 12:09:28 -0400 Subject: samples/client.c: fix implicit casting of const char pointers (#682) samples/client.c implicitly casts const char * to char * in a couple of places - as such discards the const qualifier. QEMU complains about this as it builds with -Werror=discarded-qualifiers This patch declares irq_to_str as an array of const char pointers. It also casts a "migrate_to() -> _argv" member explicitly Also adds '-Wwrite-strings' build flag to catch similar issues in the future Signed-off-by: Jagannathan Raman Reviewed-by: John Levon --- meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 753a463..03e9267 100644 --- a/meson.build +++ b/meson.build @@ -63,6 +63,7 @@ if get_option('warning_level') == '2' common_cflags += cc.get_supported_arguments([ '-Wno-missing-field-initializers', '-Wmissing-declarations', + '-Wwrite-strings', ]) endif -- cgit v1.1