OleksandrKvl/sbepp

Unused variables it, name warning

Closed this issue · 2 comments

ujos commented

In case if I compile my code with GCC 7.3 and enable -Wall, I get following warnings reported. Obviously I can disable them for the given header file. Would be great if you could fix that at your convenience:

sbepp/sbeppc/type_manager.hpp:37:33: warning: unused variable ‘name’ [-Wunused-variable]
sbepp/sbeppc/unique_set.hpp:20:33: warning: unused variable ‘it’ [-Wunused-variable]
sbepp/sbeppc/type_manager.hpp:87:30: warning: unused variable ‘name’ [-Wunused-variable]

No, I won't fix it for a couple of reasons:

  • it's a compiler bug that was fixed in GCC 8, Clang never warned about it, you can try it on godbolt.
  • you're not supposed to compile third-party project with your own set of warning/error-specific compiler flags. It's generally not possible to support all existing compiler versions and their flags, it would be a waste of time.
ujos commented

Oh sorry, I was sure it is part of the sbepp interface, not sbeppc.