Ignore gcc-10 warning (#273)
Workaround for GCC 10 null dereference warning.
This commit is contained in:
parent
dc9a7728c0
commit
834fb9999b
@ -1133,6 +1133,11 @@ namespace cxxopts
|
|||||||
m_value->parse();
|
m_value->parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Werror=null-dereference"
|
||||||
|
#endif
|
||||||
|
|
||||||
CXXOPTS_NODISCARD
|
CXXOPTS_NODISCARD
|
||||||
size_t
|
size_t
|
||||||
count() const noexcept
|
count() const noexcept
|
||||||
@ -1140,6 +1145,10 @@ namespace cxxopts
|
|||||||
return m_count;
|
return m_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
// TODO: maybe default options should count towards the number of arguments
|
// TODO: maybe default options should count towards the number of arguments
|
||||||
CXXOPTS_NODISCARD
|
CXXOPTS_NODISCARD
|
||||||
bool
|
bool
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user