mirror of
https://github.com/biojppm/rapidyaml.git
synced 2026-01-18 21:41:18 +01:00
lib: minor adjustments in warning suppressions
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
C4_SUPPRESS_WARNING_MSVC_PUSH
|
||||
C4_SUPPRESS_WARNING_GCC_CLANG_PUSH
|
||||
C4_SUPPRESS_WARNING_GCC_CLANG("-Wold-style-cast")
|
||||
#if __GNUC__ >= 6
|
||||
C4_SUPPRESS_WARNING_GCC("-Wnull-dereference")
|
||||
#endif
|
||||
|
||||
namespace c4 {
|
||||
namespace yml {
|
||||
|
||||
@@ -857,7 +857,13 @@ void Tree::set_root_as_stream()
|
||||
void Tree::remove_children(id_type node)
|
||||
{
|
||||
_RYML_CB_ASSERT(m_callbacks, get(node) != nullptr);
|
||||
#if __GNUC__ >= 6
|
||||
C4_SUPPRESS_WARNING_GCC_WITH_PUSH("-Wnull-dereference")
|
||||
#endif
|
||||
id_type ich = get(node)->m_first_child;
|
||||
#if __GNUC__ >= 6
|
||||
C4_SUPPRESS_WARNING_GCC_POP
|
||||
#endif
|
||||
while(ich != NONE)
|
||||
{
|
||||
remove_children(ich);
|
||||
@@ -1178,7 +1184,6 @@ id_type Tree::child_pos(id_type node, id_type ch) const
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||
#elif defined(__GNUC__)
|
||||
# pragma GCC diagnostic push
|
||||
# if __GNUC__ >= 6
|
||||
|
||||
@@ -785,8 +785,6 @@ public:
|
||||
/** Get the location of a node from the parse used to parse this tree. */
|
||||
Location location(Parser const& p, id_type node) const;
|
||||
|
||||
/** @} */
|
||||
|
||||
private:
|
||||
|
||||
bool _location_from_node(Parser const& p, id_type node, Location *C4_RESTRICT loc, id_type level) const;
|
||||
|
||||
Reference in New Issue
Block a user