Commit aabba1e4 authored by Thomas Haller's avatar Thomas Haller

ifcfg-rh: fix compiler warning in read_routing_rules_parse()

    CC       src/settings/plugins/ifcfg-rh/src_settings_plugins_ifcfg_rh_libnms_ifcfg_rh_core_la-nms-ifcfg-rh-reader.lo
  In file included from ../shared/nm-default.h:280:0,
                   from ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:21:
  ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c: In function read_routing_rules_parse:
  ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:4309:27: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
     nm_assert (!key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_"));
                             ^
  ../shared/nm-utils/nm-macros-internal.h:1793:7: note: in definition of macro __NM_G_BOOLEAN_EXPR_IMPL
     if (expr) \
         ^
  /usr/include/glib-2.0/glib/gmacros.h:376:43: note: in expansion of macro _G_BOOLEAN_EXPR
   #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 1))
                                             ^
  /usr/include/glib-2.0/glib/gtestutils.h:116:49: note: in expansion of macro G_LIKELY
                                                if G_LIKELY (expr) ; else \
                                                   ^
  ../shared/nm-utils/nm-macros-internal.h:973:40: note: in expansion of macro g_assert
   #define nm_assert(cond) G_STMT_START { g_assert (cond); } G_STMT_END
                                          ^
  ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:4309:3: note: in expansion of macro nm_assert
     nm_assert (!key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_"));
     ^

Fixes: 4d468044
(cherry picked from commit c6e6dcae)
parent 5fbd3d4e
Pipeline #31546 failed with stage
in 16 minutes and 31 seconds
......@@ -4305,8 +4305,8 @@ read_routing_rules_parse (shvarFile *ifcfg,
gboolean key_is_ipv4;
key_is_ipv4 = (key[NM_STRLEN ("ROUTING_RULE")] == '_');
nm_assert ( key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE_"));
nm_assert (!key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_"));
nm_assert ( key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE_"));
nm_assert ((!key_is_ipv4) == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_"));
value = svGetValueStr (ifcfg, key, &value_to_free);
if (!value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment