mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 19:50:14 +01:00
all: merge branch 'th/fix-gitlab-ci-failures'
This commit is contained in:
commit
cb2c00d823
16 changed files with 87 additions and 32 deletions
|
|
@ -96,6 +96,12 @@ t_fedora:30:
|
|||
<<: *fedora_install
|
||||
image: fedora:30
|
||||
<<: *do_build
|
||||
when: manual
|
||||
|
||||
t_fedora:31:
|
||||
<<: *fedora_install
|
||||
image: fedora:31
|
||||
<<: *do_build
|
||||
variables:
|
||||
NM_BUILD_TARBALL: 1
|
||||
artifacts:
|
||||
|
|
@ -105,9 +111,9 @@ t_fedora:30:
|
|||
- NetworkManager-1*.tar.xz
|
||||
- NetworkManager-1*.src.rpm
|
||||
|
||||
t_fedora:31:
|
||||
t_fedora:32:
|
||||
<<: *fedora_install
|
||||
image: fedora:31
|
||||
image: fedora:32
|
||||
<<: *do_build
|
||||
when: manual
|
||||
|
||||
|
|
|
|||
|
|
@ -1178,7 +1178,7 @@ nm_utils_security_valid (NMUtilsSecurityType type,
|
|||
case NMU_SEC_LEAP: /* require PRIVACY bit for LEAP? */
|
||||
if (adhoc)
|
||||
return FALSE;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case NMU_SEC_STATIC_WEP:
|
||||
if (!have_ap) {
|
||||
if (wifi_caps & (NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104))
|
||||
|
|
|
|||
|
|
@ -7760,7 +7760,7 @@ test_nm_in_set (void)
|
|||
_ASSERT (5, NM_IN_SET_SE (-1, G( 1), G( 2), G( 3), G(-1), G( 5)));
|
||||
_ASSERT (6, NM_IN_SET_SE (-1, G( 1), G( 2), G( 3), G( 4), G( 5), G(-1)));
|
||||
|
||||
(void) NM_IN_SET ("a", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16");
|
||||
g_assert (!NM_IN_SET (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));
|
||||
#undef G
|
||||
#undef N
|
||||
#undef _ASSERT
|
||||
|
|
@ -7887,7 +7887,9 @@ test_nm_in_strset (void)
|
|||
_ASSERT (6, NM_IN_STRSET ("a", G(NULL), G("b"), G("c"), G("d"), G("e"), G("a")));
|
||||
_ASSERT (6, !NM_IN_STRSET ("a", G(NULL), G("b"), G("c"), G("d"), G("e"), G("f")));
|
||||
|
||||
(void) NM_IN_STRSET ("a", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16");
|
||||
g_assert (!NM_IN_STRSET (NULL, "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"));
|
||||
g_assert (!NM_IN_STRSET ("_", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"));
|
||||
g_assert ( NM_IN_STRSET ("10", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"));
|
||||
#undef G
|
||||
#undef N
|
||||
#undef _ASSERT
|
||||
|
|
|
|||
|
|
@ -290,6 +290,7 @@ libnm_libnm_aux = static_library(
|
|||
],
|
||||
dependencies: [
|
||||
libnm_core_nm_default_dep,
|
||||
libnm_libnm_core_intern_dep,
|
||||
libnm_dep,
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ nm_vpn_service_plugin_disconnect (NMVpnServicePlugin *plugin, GError **err)
|
|||
break;
|
||||
case NM_VPN_SERVICE_STATE_STARTING:
|
||||
_emit_failure (plugin, NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED);
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case NM_VPN_SERVICE_STATE_STARTED:
|
||||
nm_vpn_service_plugin_set_state (plugin, NM_VPN_SERVICE_STATE_STOPPING);
|
||||
ret = NM_VPN_SERVICE_PLUGIN_GET_CLASS (plugin)->disconnect (plugin, err);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
|||
-Wfloat-equal \
|
||||
-Wformat-nonliteral \
|
||||
-Wformat-security \
|
||||
-Wimplicit-fallthrough \
|
||||
-Wimplicit-function-declaration \
|
||||
-Winit-self \
|
||||
-Wlogical-op \
|
||||
|
|
@ -137,6 +136,26 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
|||
[G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)]
|
||||
)
|
||||
|
||||
dnl clang started supporting -Wimplicit-fallthrough, but it does not
|
||||
dnl honor the code comments to suppress the warning. Disable the
|
||||
dnl warning with clang.
|
||||
dnl
|
||||
NM_COMPILER_WARNING([$1], [implicit-fallthrough],
|
||||
[int foo(int a);
|
||||
int foo(int a) {
|
||||
int r = 0;
|
||||
switch (a) {
|
||||
case 1:
|
||||
r++;
|
||||
/* fall-through */
|
||||
case 2:
|
||||
r++;
|
||||
break;
|
||||
}
|
||||
return r;
|
||||
}]
|
||||
)
|
||||
|
||||
eval "AS_TR_SH([$1])='$CFLAGS_MORE_WARNINGS $$1'"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
|
|
|||
23
meson.build
23
meson.build
|
|
@ -179,7 +179,6 @@ if nm_debug
|
|||
'-Wfloat-equal',
|
||||
'-Wformat-nonliteral',
|
||||
'-Wformat-security',
|
||||
'-Wimplicit-fallthrough',
|
||||
'-Wimplicit-function-declaration',
|
||||
'-Winit-self',
|
||||
'-Wlogical-op',
|
||||
|
|
@ -211,6 +210,28 @@ if nm_debug
|
|||
'-Wunknown-attributes',
|
||||
'-fno-strict-aliasing',
|
||||
])
|
||||
|
||||
if cc.has_argument('-Wimplicit-fallthrough')
|
||||
if cc.compiles('''
|
||||
int main(int argc, char **argv) {
|
||||
int r = 0;
|
||||
switch (argc) {
|
||||
case 0:
|
||||
r++;
|
||||
/* fall-through */
|
||||
case 1:
|
||||
r++;
|
||||
break;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
''',
|
||||
args: '-Werror=implicit-fallthrough',
|
||||
name: '-Werror=implicit-fallthrough')
|
||||
common_flags += '-Wimplicit-fallthrough'
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
add_project_arguments(common_flags, language: 'c')
|
||||
|
|
|
|||
|
|
@ -1241,7 +1241,7 @@ dcb_state (NMDevice *device, gboolean timeout)
|
|||
break;
|
||||
}
|
||||
_LOGD (LOGD_DCB, "dcb_state() preconfig down falling through");
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case DCB_WAIT_CARRIER_PRECONFIG_UP:
|
||||
if (timeout || carrier) {
|
||||
_LOGD (LOGD_DCB, "dcb_state() preconfig up configuring DCB");
|
||||
|
|
@ -1265,7 +1265,7 @@ dcb_state (NMDevice *device, gboolean timeout)
|
|||
break;
|
||||
}
|
||||
_LOGD (LOGD_DCB, "dcb_state() postconfig down falling through");
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case DCB_WAIT_CARRIER_POSTCONFIG_UP:
|
||||
if (timeout || carrier) {
|
||||
_LOGD (LOGD_DCB, "dcb_state() postconfig up starting IP");
|
||||
|
|
|
|||
|
|
@ -8097,7 +8097,7 @@ dhcp4_state_changed (NMDhcpClient *client,
|
|||
/* Ignore expiry before we even have a lease (NAK, old lease, etc) */
|
||||
if (priv->ip_state_4 == NM_DEVICE_IP_STATE_CONF)
|
||||
break;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case NM_DHCP_STATE_DONE:
|
||||
case NM_DHCP_STATE_FAIL:
|
||||
case NM_DHCP_STATE_TERMINATED:
|
||||
|
|
@ -8864,7 +8864,7 @@ dhcp6_state_changed (NMDhcpClient *client,
|
|||
*/
|
||||
if (priv->dhcp6.mode == NM_NDISC_DHCP_LEVEL_OTHERCONF)
|
||||
break;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case NM_DHCP_STATE_DONE:
|
||||
case NM_DHCP_STATE_FAIL:
|
||||
dhcp6_fail (self, state);
|
||||
|
|
@ -13906,7 +13906,7 @@ device_ipx_changed (NMPlatform *platform,
|
|||
(gpointer) nmp_object_ref (NMP_OBJECT_UP_CAST (addr)));
|
||||
}
|
||||
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case NMP_OBJECT_TYPE_IP6_ROUTE:
|
||||
if (!priv->queued_ip_config_id_6) {
|
||||
priv->queued_ip_config_id_6 = g_idle_add (queued_ip6_config_change, self);
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ connect_context_step (NMModemBroadband *self)
|
|||
switch (ctx->step) {
|
||||
case CONNECT_STEP_FIRST:
|
||||
ctx->step++;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
|
||||
case CONNECT_STEP_WAIT_FOR_SIM:
|
||||
if (MODEM_CAPS_3GPP (ctx->caps) && !self->_priv.sim_iface) {
|
||||
|
|
@ -556,7 +556,7 @@ connect_context_step (NMModemBroadband *self)
|
|||
break;
|
||||
}
|
||||
ctx->step++;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
|
||||
case CONNECT_STEP_UNLOCK:
|
||||
if ( MODEM_CAPS_3GPP (ctx->caps)
|
||||
|
|
@ -577,7 +577,7 @@ connect_context_step (NMModemBroadband *self)
|
|||
break;
|
||||
}
|
||||
ctx->step++;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case CONNECT_STEP_WAIT_FOR_READY: {
|
||||
GError *error = NULL;
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ connect_context_step (NMModemBroadband *self)
|
|||
|
||||
ctx->step++;
|
||||
}
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case CONNECT_STEP_CONNECT:
|
||||
if (!ctx->connect_properties)
|
||||
break;
|
||||
|
|
@ -639,7 +639,7 @@ connect_context_step (NMModemBroadband *self)
|
|||
}
|
||||
|
||||
ctx->step++;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
|
||||
case CONNECT_STEP_LAST:
|
||||
if (self->_priv.ipv4_config || self->_priv.ipv6_config)
|
||||
|
|
|
|||
|
|
@ -1805,7 +1805,7 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager)
|
|||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_UNKNOWN:
|
||||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_IMMUTABLE:
|
||||
nm_assert_not_reached ();
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED:
|
||||
return NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED;
|
||||
default:
|
||||
|
|
@ -1825,7 +1825,7 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager)
|
|||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED:
|
||||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_IMMUTABLE:
|
||||
nm_assert_not_reached ();
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE:
|
||||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_RESOLVCONF:
|
||||
case NM_DNS_MANAGER_RESOLV_CONF_MAN_NETCONFIG:
|
||||
|
|
|
|||
|
|
@ -1355,7 +1355,7 @@ _string_append_val (GString *str, const char *value)
|
|||
case '#':
|
||||
case ':':
|
||||
g_string_append_c (str, '+');
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
default:
|
||||
g_string_append_c (str, *value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3335,7 +3335,7 @@ add:
|
|||
_LOGI (LOGD_PLATFORM, "(%s): '%s' plugin not available; creating generic device",
|
||||
plink->name, nm_link_type_to_string (plink->type));
|
||||
nm_plugin_missing = TRUE;
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
default:
|
||||
device = nm_device_generic_new (plink, nm_plugin_missing);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1536,7 +1536,7 @@ test_nm_utils_strbuf_append (void)
|
|||
_strbuf_append_c (&t_buf, &t_len, str[0]);
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case 1:
|
||||
_strbuf_append_str (&t_buf, &t_len, str);
|
||||
break;
|
||||
|
|
@ -1545,7 +1545,7 @@ test_nm_utils_strbuf_append (void)
|
|||
_strbuf_append (&t_buf, &t_len, "%c", str[0]);
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case 3:
|
||||
_strbuf_append (&t_buf, &t_len, "%s", str);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -619,7 +619,7 @@ _set_vpn_state (NMVpnConnection *self,
|
|||
}
|
||||
|
||||
vpn_cleanup (self, parent_dev);
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
default:
|
||||
priv->secrets_idx = SECRETS_REQ_SYSTEM;
|
||||
break;
|
||||
|
|
@ -1580,7 +1580,7 @@ nm_vpn_connection_ip4_config_get (NMVpnConnection *self, GVariant *dict)
|
|||
switch (g_variant_n_children (v)) {
|
||||
case 5:
|
||||
g_variant_get_child (v, 4, "u", &route.pref_src);
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case 4:
|
||||
g_variant_get_child (v, 0, "u", &route.network);
|
||||
g_variant_get_child (v, 1, "u", &plen);
|
||||
|
|
|
|||
|
|
@ -295,12 +295,18 @@ fi
|
|||
if [ $HAS_ERRORS -eq 0 ]; then
|
||||
# valgrind doesn't support setns syscall and spams the logfile.
|
||||
# hack around it...
|
||||
if [ "$TEST_NAME" = 'test-link-linux' -o \
|
||||
"$TEST_NAME" = 'test-acd' ]; then
|
||||
if [ -z "$(sed -e '/^--[0-9]\+-- WARNING: unhandled .* syscall: /,/^--[0-9]\+-- it at http.*\.$/d' "$LOGFILE")" ]; then
|
||||
HAS_ERRORS=1
|
||||
fi
|
||||
fi
|
||||
case "$TEST_NAME" in
|
||||
'test-link-linux' | \
|
||||
'test-acd' | \
|
||||
'test-service-providers' | \
|
||||
'test-remote-settings-client' | \
|
||||
'test-secret-agent' | \
|
||||
'test-nm-client' )
|
||||
if [ -z "$(sed -e '/^--[0-9]\+-- WARNING: unhandled .* syscall: /,/^--[0-9]\+-- it at http.*\.$/d' "$LOGFILE")" ]; then
|
||||
HAS_ERRORS=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ $HAS_ERRORS -eq 0 ]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue