summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-12-08 00:56:34 -0500
committerTest_User <hax@andrewyu.org>2023-12-08 00:56:34 -0500
commit8532945fa2fc05e4954cb30d8687eaadefcaaba1 (patch)
tree3fc9ef3d9906dd2404e80f4fecb747c7faf32866
parentada99cc30ca9071b414e6f4a92971986919333ee (diff)
downloadcoupserv-8532945fa2fc05e4954cb30d8687eaadefcaaba1.tar.gz
coupserv-8532945fa2fc05e4954cb30d8687eaadefcaaba1.zip
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)
-rw-r--r--client_network.c5
1 files changed, 4 insertions, 1 deletions
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);