wrap proto includes to avoid build warnings

This commit is contained in:
otavepto 2024-06-15 16:48:49 +03:00
parent eb78b5bf0b
commit 706422661a
2 changed files with 15 additions and 1 deletions

View File

@ -237,7 +237,7 @@ static inline void reset_LastError()
// Emulator includes // Emulator includes
// add them here after the inline functions definitions // add them here after the inline functions definitions
#include "net.pb.h" #include "include.wrap.net.pb.h"
#include "settings.h" #include "settings.h"
#include "local_storage.h" #include "local_storage.h"
#include "network.h" #include "network.h"

View File

@ -0,0 +1,14 @@
#if defined(__linux__) || defined(linux) || defined(GNUC) || defined(__MINGW32__) || defined(__MINGW64__)
// https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
// https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#include "net.pb.h"
#pragma GCC diagnostic pop
#else
// https://learn.microsoft.com/en-us/cpp/preprocessor/warning?view=msvc-170#push-and-pop
#pragma warning(push, 0)
#include "net.pb.h"
#pragma warning(pop)
#endif