NetworkManager/src/platform
Thomas Haller 994dc555d5 platform: avoid compiler warning in _NMP_OBJECT_TYPE_IS_OBJ_WITH_IFINDEX()
Surisingly, the compiler may detect the remaining obj_type in
the default switch. Then, inlining nmp_class_from_type() it may detect
that this is only possible to hit with an out or range access to
_nmp_classes array.

Rework the code to avoid that compiler warning. It's either way not
supposed to happen.

Also, drop the default switch case and explicitly list the enum values.
Otherwise it is error prone to forget a switch case.

(cherry picked from commit 9848589fbf)
(cherry picked from commit 6f189da7b6)
(cherry picked from commit 6da20c24cd)
2020-04-20 19:52:50 +02:00
..
linux platform: import nl82154.h 2018-06-26 16:21:54 +02:00
tests platform/tests: rename platform's "test-general.c" 2019-10-08 15:26:50 +02:00
wifi platform: assert for out-of-memory in netlink code 2019-05-15 14:07:08 +02:00
wpan platform: assert for out-of-memory in netlink code 2019-05-15 14:07:08 +02:00
nm-fake-platform.c platform: refactor detecting kernel features 2019-04-18 11:19:26 +02:00
nm-fake-platform.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-linux-platform.c device/trivial: add comment about lifetime of "kind" in tc_commit() 2019-05-15 14:07:08 +02:00
nm-linux-platform.h platform: use NMDedupMultiIndex for routes in NMPCache 2017-07-05 18:37:38 +02:00
nm-netlink.c platform/netlink: mark nested netlink attribute with NLA_F_NESTED 2019-07-23 14:45:09 +02:00
nm-netlink.h shared: split C-only helper "shared/nm-std-aux" utils out of "shared/nm-utils" 2019-04-18 19:17:23 +02:00
nm-platform-private.h platform: expose emit-signal function from platform 2017-07-05 18:37:39 +02:00
nm-platform-utils.c platform: fix GCC warning about zero-length array in nmp_utils_ethtool_get_permanent_address() 2020-04-20 13:49:27 +02:00
nm-platform-utils.h shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 20:07:44 +02:00
nm-platform.c device/trivial: add comment about lifetime of "kind" in tc_commit() 2019-05-15 14:07:08 +02:00
nm-platform.h platform: make nm_platform_kernel_support_get() macro an inline function 2019-10-08 15:26:50 +02:00
nmp-netns.c all: replace g_strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
nmp-netns.h core: cleanup implementation of nm_auto* macros to use nm_auto() 2017-10-11 08:43:40 +02:00
nmp-object.c platform: avoid compiler error passing NMP_OBJECT_CAST_OBJ_WITH_IFINDEX() to nm_hash_update_vals() 2019-10-08 15:26:50 +02:00
nmp-object.h platform: avoid compiler warning in _NMP_OBJECT_TYPE_IS_OBJ_WITH_IFINDEX() 2020-04-20 19:52:50 +02:00
nmp-rules-manager.c policy-routing: take ownership of externally configured rules 2019-07-25 10:29:16 +02:00
nmp-rules-manager.h policy-routing: take ownership of externally configured rules 2019-07-25 10:29:16 +02:00