From 8532945fa2fc05e4954cb30d8687eaadefcaaba1 Mon Sep 17 00:00:00 2001 From: Test_User Date: Fri, 8 Dec 2023 00:56:34 -0500 Subject: Silence a warning for gcc, clang goes and complains bc it's not gcc... whatever, this one's clearly clang's fault (clang still compiles) --- client_network.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client_network.c b/client_network.c index cef4776..46e9342 100644 --- a/client_network.c +++ b/client_network.c @@ -228,7 +228,10 @@ int client_nick_handler(uint64_t argc, struct string *argv) { struct user_info *client = get_table_index(user_list, STRING("1HC000001")); if (client) { free(client->nick.data); - client->nick.data = name_for_tables; // Will not be used uninitialized, ignore the compiler's complaint here +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" + client->nick.data = name_for_tables; // Will not be used uninitialized, ignore the compiler's complaint here +#pragma GCC diagnostic pop // Compiler sees global variable and assumes it may be changed in one of the functions called between checks client->nick.len = argv[0].len; } else { free(name_for_tables); -- cgit v1.2.3