diff options
author | pommicket <pommicket@gmail.com> | 2022-12-29 17:33:29 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-29 17:33:29 -0500 |
commit | 5f7af06a9085835a3d1ad3a51374c245859d7d97 (patch) | |
tree | f8ea4ad4d809334131b479ff8b9c0bd125c45f29 /lsp.c | |
parent | e4aac4859511cb22ed84946eb5510cd7fa14e147 (diff) |
fix GCC warnings
Diffstat (limited to 'lsp.c')
-rw-r--r-- | lsp.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -253,7 +253,17 @@ static bool lsp_send(LSP *lsp) { size_t n_messages = arr_len(lsp->messages_client2server); messages = calloc(n_messages, sizeof *messages); memcpy(messages, lsp->messages_client2server, n_messages * sizeof *messages); + + #if __GNUC__ && !__clang__ + #pragma GCC diagnostic push + // i don't know why GCC is giving me this. some compiler bug. + #pragma GCC diagnostic ignored "-Wfree-nonheap-object" + #endif arr_clear(lsp->messages_client2server); + #if __GNUC__ && !__clang__ + #pragma GCC diagnostic pop + #endif + SDL_UnlockMutex(lsp->messages_mutex); bool quit = false; @@ -291,11 +301,11 @@ static int lsp_communication_thread(void *data) { if (lsp->initialized) { LSPRequest shutdown = { .type = LSP_REQUEST_SHUTDOWN, - .data = {0} + .data = {{0}} }; LSPRequest exit = { .type = LSP_REQUEST_EXIT, - .data = {0} + .data = {{0}} }; write_request(lsp, &shutdown); // i give you ONE MILLISECOND to send your fucking shutdown response |