diff --git a/src/libsystemd/sd-device/device-internal.h b/src/libsystemd/sd-device/device-internal.h index f60d54af1b..996008bf6d 100644 --- a/src/libsystemd/sd-device/device-internal.h +++ b/src/libsystemd/sd-device/device-internal.h @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once +#include "sd-device.h" + #include "hashmap.h" #include "set.h" diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c index 11cd7faa8b..e1c34384ec 100644 --- a/src/network/test-network-tables.c +++ b/src/network/test-network-tables.c @@ -22,6 +22,7 @@ int main(int argc, char **argv) { test_table(bond_primary_reselect, NETDEV_BOND_PRIMARY_RESELECT); test_table(bond_xmit_hash_policy, NETDEV_BOND_XMIT_HASH_POLICY); test_table(dhcp6_message_status, DHCP6_STATUS); + /* test_table(dhcp6_message_type, DHCP6_MESSAGE); — enum starts from 1 */ test_table(dhcp_use_domains, DHCP_USE_DOMAINS); test_table(duplex, DUP); test_table(ip6tnl_mode, NETDEV_IP6_TNL_MODE); diff --git a/src/resolve/resolved-dns-server.h b/src/resolve/resolved-dns-server.h index dffc4217d1..53d45a6361 100644 --- a/src/resolve/resolved-dns-server.h +++ b/src/resolve/resolved-dns-server.h @@ -13,8 +13,9 @@ typedef enum DnsServerType { DNS_SERVER_SYSTEM, DNS_SERVER_FALLBACK, DNS_SERVER_LINK, + _DNS_SERVER_TYPE_MAX, + _DNS_SERVER_TYPE_INVALID = -1 } DnsServerType; -#define _DNS_SERVER_TYPE_MAX (DNS_SERVER_LINK + 1) const char* dns_server_type_to_string(DnsServerType i) _const_; DnsServerType dns_server_type_from_string(const char *s) _pure_; diff --git a/src/resolve/test-resolve-tables.c b/src/resolve/test-resolve-tables.c index 842d42b311..2230a66ef5 100644 --- a/src/resolve/test-resolve-tables.c +++ b/src/resolve/test-resolve-tables.c @@ -1,11 +1,18 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include "dns-type.h" +#include "resolved-dns-dnssec.h" +#include "resolved-dns-packet.h" #include "test-tables.h" int main(int argc, char **argv) { uint16_t i; + test_table(dns_protocol, DNS_PROTOCOL); + test_table(dnssec_result, DNSSEC_RESULT); + test_table(dnssec_verdict, DNSSEC_VERDICT); + + test_table_sparse(dns_rcode, DNS_RCODE); test_table_sparse(dns_type, DNS_TYPE); log_info("/* DNS_TYPE */"); diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d9bef997d5..64584e4a86 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -4927,7 +4927,7 @@ typedef enum SystemctlShowMode{ _SYSTEMCTL_SHOW_MODE_INVALID = -1, } SystemctlShowMode; -static const char* const systemctl_show_mode_table[] = { +static const char* const systemctl_show_mode_table[_SYSTEMCTL_SHOW_MODE_MAX] = { [SYSTEMCTL_SHOW_PROPERTIES] = "show", [SYSTEMCTL_SHOW_STATUS] = "status", [SYSTEMCTL_SHOW_HELP] = "help", diff --git a/src/test/test-tables.c b/src/test/test-tables.c index 944104a25a..027eaf3332 100644 --- a/src/test/test-tables.c +++ b/src/test/test-tables.c @@ -5,6 +5,7 @@ #include "cgroup.h" #include "compress.h" #include "condition.h" +#include "device-internal.h" #include "device.h" #include "execute.h" #include "import-util.h" @@ -47,7 +48,9 @@ int main(int argc, char **argv) { test_table(collect_mode, COLLECT_MODE); test_table(condition_result, CONDITION_RESULT); test_table(condition_type, CONDITION_TYPE); + test_table(device_action, DEVICE_ACTION); test_table(device_state, DEVICE_STATE); + test_table(dns_over_tls_mode, DNS_OVER_TLS_MODE); test_table(dnssec_mode, DNSSEC_MODE); test_table(emergency_action, EMERGENCY_ACTION); test_table(exec_directory_type, EXEC_DIRECTORY_TYPE); @@ -75,6 +78,7 @@ int main(int argc, char **argv) { test_table(name_policy, NAMEPOLICY); test_table(namespace_type, NAMESPACE_TYPE); test_table(notify_access, NOTIFY_ACCESS); + test_table(notify_state, NOTIFY_STATE); test_table(output_mode, OUTPUT_MODE); test_table(partition_designator, PARTITION_DESIGNATOR); test_table(path_result, PATH_RESULT);