From 1fa7e1260d8b3c588c65ecb0c0f5d589ab61b1be Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 31 Jan 2020 10:13:35 +0100 Subject: cli: fix warnings with -Wshadow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mmcli-manager.c: In function ‘context_free’: mmcli-manager.c:167:24: error: declaration of ‘ctx’ shadows a global declaration [-Werror=shadow] 167 | context_free (Context *ctx) | ~~~~~~~~~^~~ mmcli-manager.c:51:17: note: shadowed declaration is here 51 | static Context *ctx; | ^~~ ... --- cli/mmcli-modem-messaging.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cli/mmcli-modem-messaging.c') diff --git a/cli/mmcli-modem-messaging.c b/cli/mmcli-modem-messaging.c index e56d9bc3..681929a4 100644 --- a/cli/mmcli-modem-messaging.c +++ b/cli/mmcli-modem-messaging.c @@ -124,7 +124,7 @@ mmcli_modem_messaging_options_enabled (void) } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -161,7 +161,7 @@ ensure_modem_messaging (void) void mmcli_modem_messaging_shutdown (void) { - context_free (ctx); + context_free (); } static MMSmsProperties * @@ -457,7 +457,6 @@ mmcli_modem_messaging_run_synchronous (GDBusConnection *connection) /* Request to create a new SMS? */ if (create_str) { MMSms *sms; - GError *error = NULL; MMSmsProperties *properties; properties = build_sms_properties_from_input (create_str, -- cgit v1.2.3-70-g09d2