From a6a1d0c65e3d5f171053ae92cd89ca5f1ae7b8c1 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Mon, 12 Feb 2024 00:44:13 +0100 Subject: [PATCH] ignore discarded qualifiers warning upon assigning string literal ccls still shows me the warning and another one for the `diagnostic ignored` saying `unknown warning group`, not sure if it's fixable in ccls, might be time to move to clang/d? although I've heard it has issues too, not sure --- modules/sep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/sep.c b/modules/sep.c index f8e5d56..940b5ad 100644 --- a/modules/sep.c +++ b/modules/sep.c @@ -23,7 +23,10 @@ semver version(void) { return _version; } const char *name(void) { return "sep"; } static size_t length = 8; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" static char *sep_char = "-"; +#pragma GCC diagnostic pop static size_t sep_char_length = 1; uint8_t init(semver api_ver, char **config) {