cli: fix warnings with -Wshadow

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;
        |                 ^~~
  ...
This commit is contained in:
Aleksander Morgado
2020-01-31 15:18:35 +01:00
parent 1216e88716
commit 1fa7e1260d
16 changed files with 32 additions and 41 deletions
+2 -3
View File
@@ -205,7 +205,7 @@ mmcli_modem_options_enabled (void)
}
static void
context_free (Context *ctx)
context_free (void)
{
if (!ctx)
return;
@@ -230,7 +230,7 @@ context_free (Context *ctx)
void
mmcli_modem_shutdown (void)
{
context_free (ctx);
context_free ();
}
static void
@@ -1294,7 +1294,6 @@ mmcli_modem_run_synchronous (GDBusConnection *connection)
/* Request to create a new bearer? */
if (create_bearer_str) {
MMBearer *bearer;
GError *error = NULL;
MMBearerProperties *properties;
properties = mm_bearer_properties_new_from_string (create_bearer_str, &error);