aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-01-31 10:13:35 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-01-31 15:18:35 +0100
commit1fa7e1260d8b3c588c65ecb0c0f5d589ab61b1be (patch)
tree13220c1ddde591c383615ca83ff7f9df2e75901b /cli
parent1216e887168c580b5cd868dfa3f798ab90a43001 (diff)
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; | ^~~ ...
Diffstat (limited to 'cli')
-rw-r--r--cli/mmcli-bearer.c4
-rw-r--r--cli/mmcli-call.c4
-rw-r--r--cli/mmcli-manager.c4
-rw-r--r--cli/mmcli-modem-3gpp.c5
-rw-r--r--cli/mmcli-modem-cdma.c4
-rw-r--r--cli/mmcli-modem-firmware.c5
-rw-r--r--cli/mmcli-modem-location.c4
-rw-r--r--cli/mmcli-modem-messaging.c5
-rw-r--r--cli/mmcli-modem-oma.c7
-rw-r--r--cli/mmcli-modem-signal.c4
-rw-r--r--cli/mmcli-modem-simple.c4
-rw-r--r--cli/mmcli-modem-time.c4
-rw-r--r--cli/mmcli-modem-voice.c5
-rw-r--r--cli/mmcli-modem.c5
-rw-r--r--cli/mmcli-sim.c4
-rw-r--r--cli/mmcli-sms.c5
16 files changed, 32 insertions, 41 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c
index 6e239ed4..cae68ea3 100644
--- a/cli/mmcli-bearer.c
+++ b/cli/mmcli-bearer.c
@@ -108,7 +108,7 @@ mmcli_bearer_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -127,7 +127,7 @@ context_free (Context *ctx)
void
mmcli_bearer_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-call.c b/cli/mmcli-call.c
index 99c8b764..7b4f5ecf 100644
--- a/cli/mmcli-call.c
+++ b/cli/mmcli-call.c
@@ -139,7 +139,7 @@ mmcli_call_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -158,7 +158,7 @@ context_free (Context *ctx)
void
mmcli_call_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-manager.c b/cli/mmcli-manager.c
index dac107c9..e1e3c36c 100644
--- a/cli/mmcli-manager.c
+++ b/cli/mmcli-manager.c
@@ -164,7 +164,7 @@ mmcli_manager_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -184,7 +184,7 @@ context_free (Context *ctx)
void
mmcli_manager_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-modem-3gpp.c b/cli/mmcli-modem-3gpp.c
index 234fdf83..21031d66 100644
--- a/cli/mmcli-modem-3gpp.c
+++ b/cli/mmcli-modem-3gpp.c
@@ -154,7 +154,7 @@ mmcli_modem_3gpp_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -207,7 +207,7 @@ ensure_modem_3gpp_ussd (void)
void
mmcli_modem_3gpp_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
@@ -624,7 +624,6 @@ mmcli_modem_3gpp_run_synchronous (GDBusConnection *connection)
/* Request to set initial EPS bearer properties? */
if (set_initial_eps_bearer_settings_str) {
- GError *error = NULL;
gboolean result;
MMBearerProperties *config;
diff --git a/cli/mmcli-modem-cdma.c b/cli/mmcli-modem-cdma.c
index 5db1e5f0..58651b69 100644
--- a/cli/mmcli-modem-cdma.c
+++ b/cli/mmcli-modem-cdma.c
@@ -107,7 +107,7 @@ mmcli_modem_cdma_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -142,7 +142,7 @@ ensure_modem_cdma (void)
void
mmcli_modem_cdma_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-modem-firmware.c b/cli/mmcli-modem-firmware.c
index 48d08628..20dce4fe 100644
--- a/cli/mmcli-modem-firmware.c
+++ b/cli/mmcli-modem-firmware.c
@@ -106,7 +106,7 @@ mmcli_modem_firmware_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -136,7 +136,7 @@ ensure_modem_firmware (void)
void
mmcli_modem_firmware_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
@@ -344,7 +344,6 @@ mmcli_modem_firmware_run_synchronous (GDBusConnection *connection)
/* Request to select a given image? */
if (select_str) {
gboolean result;
- GError *error = NULL;
g_debug ("Synchronously selecting firmware image in modem...");
result = mm_modem_firmware_select_sync (ctx->modem_firmware,
diff --git a/cli/mmcli-modem-location.c b/cli/mmcli-modem-location.c
index 2011bba3..6ef42b7a 100644
--- a/cli/mmcli-modem-location.c
+++ b/cli/mmcli-modem-location.c
@@ -227,7 +227,7 @@ mmcli_modem_location_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -262,7 +262,7 @@ ensure_modem_location (void)
void
mmcli_modem_location_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
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,
diff --git a/cli/mmcli-modem-oma.c b/cli/mmcli-modem-oma.c
index 0c615303..13fdc5ab 100644
--- a/cli/mmcli-modem-oma.c
+++ b/cli/mmcli-modem-oma.c
@@ -125,7 +125,7 @@ mmcli_modem_oma_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -155,7 +155,7 @@ ensure_modem_oma (void)
void
mmcli_modem_oma_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
@@ -439,7 +439,6 @@ mmcli_modem_oma_run_synchronous (GDBusConnection *connection)
/* Request to setup OMA features? */
if (setup_str) {
gboolean result;
- GError *error = NULL;
MMOmaFeature features;
features = mm_common_get_oma_features_from_string (setup_str, &error);
@@ -460,7 +459,6 @@ mmcli_modem_oma_run_synchronous (GDBusConnection *connection)
/* Request to start session? */
if (start_str) {
gboolean result;
- GError *error = NULL;
MMOmaSessionType session_type;
session_type = mm_common_get_oma_session_type_from_string (start_str, &error);
@@ -481,7 +479,6 @@ mmcli_modem_oma_run_synchronous (GDBusConnection *connection)
/* Request to accept or reject session? */
if (accept_str || reject_str) {
gboolean result;
- GError *error = NULL;
guint session_id;
if (!mm_get_uint_from_str (accept_str ? accept_str : reject_str, &session_id)) {
diff --git a/cli/mmcli-modem-signal.c b/cli/mmcli-modem-signal.c
index fa45f102..c5bf435e 100644
--- a/cli/mmcli-modem-signal.c
+++ b/cli/mmcli-modem-signal.c
@@ -100,7 +100,7 @@ mmcli_modem_signal_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -130,7 +130,7 @@ ensure_modem_signal (void)
void
mmcli_modem_signal_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-modem-simple.c b/cli/mmcli-modem-simple.c
index facd3b0f..35c85a8a 100644
--- a/cli/mmcli-modem-simple.c
+++ b/cli/mmcli-modem-simple.c
@@ -101,7 +101,7 @@ mmcli_modem_simple_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -131,7 +131,7 @@ ensure_modem_simple (void)
void
mmcli_modem_simple_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-modem-time.c b/cli/mmcli-modem-time.c
index b210e53d..79f2a80c 100644
--- a/cli/mmcli-modem-time.c
+++ b/cli/mmcli-modem-time.c
@@ -91,7 +91,7 @@ mmcli_modem_time_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -126,7 +126,7 @@ ensure_modem_time (void)
void
mmcli_modem_time_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-modem-voice.c b/cli/mmcli-modem-voice.c
index 878984b3..0f066b3f 100644
--- a/cli/mmcli-modem-voice.c
+++ b/cli/mmcli-modem-voice.c
@@ -156,7 +156,7 @@ mmcli_modem_voice_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -188,7 +188,7 @@ ensure_modem_voice (void)
void
mmcli_modem_voice_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static MMCallProperties *
@@ -673,7 +673,6 @@ mmcli_modem_voice_run_synchronous (GDBusConnection *connection)
/* Request to create a new call? */
if (create_str) {
MMCall *call;
- GError *error = NULL;
MMCallProperties *properties;
properties = build_call_properties_from_input (create_str);
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c
index 32272d81..e74c7936 100644
--- a/cli/mmcli-modem.c
+++ b/cli/mmcli-modem.c
@@ -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);
diff --git a/cli/mmcli-sim.c b/cli/mmcli-sim.c
index e7f885e4..75d3d075 100644
--- a/cli/mmcli-sim.c
+++ b/cli/mmcli-sim.c
@@ -133,7 +133,7 @@ mmcli_sim_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -152,7 +152,7 @@ context_free (Context *ctx)
void
mmcli_sim_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
diff --git a/cli/mmcli-sms.c b/cli/mmcli-sms.c
index 575e3544..a5fa45bf 100644
--- a/cli/mmcli-sms.c
+++ b/cli/mmcli-sms.c
@@ -123,7 +123,7 @@ mmcli_sms_options_enabled (void)
}
static void
-context_free (Context *ctx)
+context_free (void)
{
if (!ctx)
return;
@@ -142,7 +142,7 @@ context_free (Context *ctx)
void
mmcli_sms_shutdown (void)
{
- context_free (ctx);
+ context_free ();
}
static void
@@ -411,7 +411,6 @@ mmcli_sms_run_synchronous (GDBusConnection *connection)
if (store_in_storage_str) {
gboolean operation_result;
MMSmsStorage storage;
- GError *error = NULL;
storage = mm_common_get_sms_storage_from_string (store_in_storage_str, &error);
if (error) {