Fix null dereference warning error

Fixes #276. Remove the fix for null dereference warning for GCC after
10.1.0 because this was removed in later versions.
This commit is contained in:
Jarryd Beck 2021-01-23 14:08:56 +11:00
parent ed85f04a1b
commit e862445ef3

View File

@ -1134,8 +1134,10 @@ namespace cxxopts
}
#if defined(__GNUC__)
#if __GNUC__ <= 10 && __GNUC_MINOR__ <= 1
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Werror=null-dereference"
#endif
#endif
CXXOPTS_NODISCARD
@ -1146,7 +1148,9 @@ namespace cxxopts
}
#if defined(__GNUC__)
#if __GNUC__ <= 10 && __GNUC_MINOR__ <= 1
#pragma GCC diagnostic pop
#endif
#endif
// TODO: maybe default options should count towards the number of arguments