From c1d94d70814d1d28ef842c3d81357575d78df954 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 18 Jun 2025 15:52:21 +0200 Subject: [PATCH] connectivity: fix compiler warning when building without concheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following: ../src/core/nm-connectivity.c:958:1: warning: ‘check_platform_config’ defined but not used [-Wunused-function] 958 | check_platform_config(NMConnectivity *self, | ^~~~~~~~~~~~~~~~~~~~~ Fixes: 91d447df19a7 ('device: don't start connectivity check on unconfigured devices') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2224 (cherry picked from commit 1253cbad5afc0017ba146d8f20f059c10e63f163) --- src/core/nm-connectivity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c index 22e6c0d5eb..2aa22331ea 100644 --- a/src/core/nm-connectivity.c +++ b/src/core/nm-connectivity.c @@ -25,6 +25,8 @@ #define HEADER_STATUS_ONLINE "X-NetworkManager-Status: online\r\n" +#define SD_RESOLVED_DNS ((guint64) (1LL << 0)) + /*****************************************************************************/ static NM_UTILS_LOOKUP_STR_DEFINE(_state_to_string, @@ -950,9 +952,6 @@ systemd_resolved_resolve_cb(GObject *object, GAsyncResult *res, gpointer user_da do_curl_request(cb_data, nm_str_buf_get_str(&strbuf_hosts)); } -#endif - -#define SD_RESOLVED_DNS ((guint64) (1LL << 0)) static NMConnectivityState check_platform_config(NMConnectivity *self, @@ -1013,6 +1012,7 @@ check_platform_config(NMConnectivity *self, NM_SET_OUT(reason, NULL); return NM_CONNECTIVITY_UNKNOWN; } +#endif NMConnectivityCheckHandle * nm_connectivity_check_start(NMConnectivity *self,