[Replicant] [PATCH 02/15] tools: silence unused variable warnings
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Tue May 7 13:57:21 UTC 2019
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
tools/ipc-modem.c | 12 ++++++++----
tools/ipc-test.c | 6 ++++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/tools/ipc-modem.c b/tools/ipc-modem.c
index 935677b..b86eed2 100644
--- a/tools/ipc-modem.c
+++ b/tools/ipc-modem.c
@@ -276,7 +276,8 @@ void modem_response_call(struct ipc_client *client, struct ipc_message *resp)
}
}
-void modem_response_pwr(struct ipc_client *client, struct ipc_message *resp)
+void modem_response_pwr(__attribute__((unused)) struct ipc_client *client,
+ struct ipc_message *resp)
{
int state_n;
@@ -307,7 +308,8 @@ void modem_response_pwr(struct ipc_client *client, struct ipc_message *resp)
}
}
-void modem_response_net(struct ipc_client *client, struct ipc_message *resp)
+void modem_response_net(__attribute__((unused)) struct ipc_client *client,
+ struct ipc_message *resp)
{
struct ipc_net_regist_response_data *regi;
struct ipc_net_plmn_entry *plmn;
@@ -397,7 +399,8 @@ int modem_read_loop(struct ipc_client *client)
return 0;
}
-void modem_log_handler(void *user_data, const char *msg)
+void modem_log_handler(__attribute__((unused)) void *user_data,
+ const char *msg)
{
int i, l;
char *message;
@@ -421,7 +424,8 @@ void modem_log_handler(void *user_data, const char *msg)
free(message);
}
-void modem_log_handler_quiet(void *user_data, const char *msg)
+void modem_log_handler_quiet(__attribute__((unused)) void *user_data,
+ __attribute__((unused)) const char *msg)
{
return;
}
diff --git a/tools/ipc-test.c b/tools/ipc-test.c
index 6746371..cc8548f 100644
--- a/tools/ipc-test.c
+++ b/tools/ipc-test.c
@@ -23,7 +23,8 @@
#include <samsung-ipc.h>
-void log_callback(void *data, const char *message)
+void log_callback(__attribute__((unused)) void *data,
+ const char *message)
{
char *buffer;
size_t length;
@@ -47,7 +48,8 @@ void log_callback(void *data, const char *message)
free(buffer);
}
-int main(int args, char *argv[])
+int main(__attribute__((unused)) int args,
+ __attribute__((unused)) char *argv[])
{
struct ipc_client *client = NULL;
struct ipc_message message;
--
2.21.0
More information about the Replicant
mailing list