4

I want to disable "Wmaybe-uninitialized" warning. I use omnet++ ( base on c++ ) to simulate my project. Is there anyway to disable this warning ? I also found the following code , but it doesn't work.

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic pop

1 Answers1

0

Adding the flag -Wno-maybe-uninitialized works, but should be used with care. See the thread GCC -Wuninitialized / -Wmaybe-uninitialized issues

sbkm
  • 107
  • 5