[Replicant] [PATCH 3/6] Silence warnings about unused parameters
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Tue May 7 13:58:01 UTC 2019
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
call.c | 21 +++++++++++++++------
data.c | 9 ++++++---
ipc.c | 3 ++-
misc.c | 17 ++++++++++++-----
network.c | 47 ++++++++++++++++++++++++++++++-----------------
power.c | 4 ++--
samsung-ril.c | 7 ++++---
sim.c | 4 +++-
8 files changed, 74 insertions(+), 38 deletions(-)
diff --git a/call.c b/call.c
index adb8316..bd36335 100644
--- a/call.c
+++ b/call.c
@@ -124,7 +124,7 @@ complete:
return rc;
}
-int ipc_call_incoming(struct ipc_message *message)
+int ipc_call_incoming(__attribute__((unused)) struct ipc_message *message)
{
ril_request_unsolicited(RIL_UNSOL_CALL_RING, NULL, 0);
@@ -133,7 +133,8 @@ int ipc_call_incoming(struct ipc_message *message)
return 0;
}
-int ril_request_hangup(void *data, size_t size, RIL_Token token)
+int ril_request_hangup(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size, RIL_Token token)
{
int hangup;
int rc;
@@ -169,7 +170,9 @@ complete:
return rc;
}
-int ril_request_answer(void *data, size_t size, RIL_Token token)
+int ril_request_answer(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
int rc;
@@ -228,7 +231,9 @@ int ipc_call_status(struct ipc_message *message)
return 0;
}
-int ril_request_last_call_fail_cause(void *data, size_t size, RIL_Token token)
+int ril_request_last_call_fail_cause(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
void *fail_cause_data;
size_t fail_cause_size;
@@ -339,7 +344,9 @@ complete:
return 0;
}
-int ril_request_get_current_calls(void *data, size_t size, RIL_Token token)
+int ril_request_get_current_calls(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
int rc;
@@ -647,7 +654,9 @@ int ril_request_dtmf_stop_complete(unsigned char aseq, int callback)
return 0;
}
-int ril_request_dtmf_stop(void *data, size_t size, RIL_Token token)
+int ril_request_dtmf_stop(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ril_request *request;
void *dtmf_data;
diff --git a/data.c b/data.c
index 4eddfe7..7f7439a 100644
--- a/data.c
+++ b/data.c
@@ -660,7 +660,9 @@ int ipc_gprs_pdp_context(struct ipc_message *message)
return 0;
}
-int ril_request_data_call_list(void *data, size_t size, RIL_Token token)
+int ril_request_data_call_list(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
int rc;
@@ -1013,8 +1015,9 @@ complete:
return 0;
}
-int ril_request_last_data_call_fail_cause(void *data, size_t size,
- RIL_Token token)
+int ril_request_last_data_call_fail_cause(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
void *fail_cause_data;
size_t fail_cause_size;
diff --git a/ipc.c b/ipc.c
index e791ced..3286370 100644
--- a/ipc.c
+++ b/ipc.c
@@ -32,7 +32,8 @@
* Utils
*/
-void ipc_log_handler(void *log_data, const char *message)
+void ipc_log_handler(__attribute__((unused)) void *log_data,
+ const char *message)
{
RIL_LOGD("%s", message);
}
diff --git a/misc.c b/misc.c
index 81bf371..d69f5bd 100644
--- a/misc.c
+++ b/misc.c
@@ -29,7 +29,6 @@ int ipc_misc_me_version(struct ipc_message *message)
{
struct ipc_misc_me_version_response_data *data;
char *baseband_version;
- int active;
if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_misc_me_version_response_data))
return -1;
@@ -48,7 +47,9 @@ int ipc_misc_me_version(struct ipc_message *message)
return 0;
}
-int ril_request_baseband_version(void *data, size_t size, RIL_Token token)
+int ril_request_baseband_version(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ipc_misc_me_version_request_data request_data;
struct ril_request *request;
@@ -105,7 +106,9 @@ int ipc_misc_me_imsi(struct ipc_message *message)
return 0;
}
-int ril_request_get_imsi(void *data, size_t size, RIL_Token token)
+int ril_request_get_imsi(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ril_request *request;
int rc;
@@ -178,7 +181,9 @@ int ipc_misc_me_sn(struct ipc_message *message)
return 0;
}
-int ril_request_get_imei(void *data, size_t size, RIL_Token token)
+int ril_request_get_imei(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ipc_misc_me_sn_request_data request_data;
struct ril_request *request;
@@ -208,7 +213,9 @@ int ril_request_get_imei(void *data, size_t size, RIL_Token token)
return RIL_REQUEST_HANDLED;
}
-int ril_request_get_imeisv(void *data, size_t size, RIL_Token token)
+int ril_request_get_imeisv(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ipc_misc_me_sn_request_data request_data;
struct ril_request *request;
diff --git a/network.c b/network.c
index 668a5ad..d97b9d0 100644
--- a/network.c
+++ b/network.c
@@ -442,7 +442,9 @@ int ipc_disp_icon_info(struct ipc_message *message)
return 0;
}
-int ril_request_signal_strength(void *data, size_t size, RIL_Token token)
+int ril_request_signal_strength(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ipc_disp_icon_info_request_data request_data;
int rc;
@@ -516,8 +518,9 @@ int ipc_net_plmn_sel(struct ipc_message *message)
return 0;
}
-int ril_request_query_network_selection_mode(void *data, size_t size,
- RIL_Token token)
+int ril_request_query_network_selection_mode(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
int rc;
@@ -560,8 +563,9 @@ int ipc_net_plmn_sel_callback(struct ipc_message *message)
return 0;
}
-int ril_request_set_network_selection_automatic(void *data, size_t size,
- RIL_Token token)
+int ril_request_set_network_selection_automatic(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ipc_net_plmn_sel_request_data request_data;
int rc;
@@ -679,7 +683,9 @@ int ipc_net_serving_network(struct ipc_message *message)
return 0;
}
-int ril_request_operator(void *data, size_t size, RIL_Token token)
+int ril_request_operator(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ril_request *request;
void *operator_data;
@@ -808,8 +814,9 @@ complete:
return 0;
}
-int ril_request_query_available_networks(void *data, size_t size,
- RIL_Token token)
+int ril_request_query_available_networks(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
struct ril_request *request;
int rc;
@@ -936,10 +943,13 @@ complete:
}
#if RIL_VERSION >= 6
-int ril_request_voice_registration_state(void *data, size_t size,
- RIL_Token token)
+int ril_request_voice_registration_state(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
#else
-int ril_request_registration_state(void *data, size_t size, RIL_Token token)
+int ril_request_registration_state(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
#endif
{
struct ipc_net_regist_request_data request_data;
@@ -1008,11 +1018,13 @@ complete:
}
#if RIL_VERSION >= 6
-int ril_request_data_registration_state(void *data, size_t size,
- RIL_Token token)
+int ril_request_data_registration_state(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
#else
-int ril_request_gprs_registration_state(void *data, size_t size,
- RIL_Token token)
+int ril_request_gprs_registration_state(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
#endif
{
struct ipc_net_regist_request_data request_data;
@@ -1105,8 +1117,9 @@ int ipc_net_mode_sel(struct ipc_message *message)
return 0;
}
-int ril_request_get_preferred_network_type(void *data, size_t size,
- RIL_Token token)
+int ril_request_get_preferred_network_type(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
int rc;
diff --git a/power.c b/power.c
index 6de7eb0..011570f 100644
--- a/power.c
+++ b/power.c
@@ -26,14 +26,14 @@
#include <samsung-ril.h>
#include <utils.h>
-int ipc_pwr_phone_pwr_up(struct ipc_message *message)
+int ipc_pwr_phone_pwr_up(__attribute__((unused)) struct ipc_message *message)
{
ril_radio_state_update(RADIO_STATE_OFF);
return 0;
}
-int ipc_pwr_phone_reset(struct ipc_message *message)
+int ipc_pwr_phone_reset(__attribute__((unused)) struct ipc_message *message)
{
ril_radio_state_update(RADIO_STATE_OFF);
diff --git a/samsung-ril.c b/samsung-ril.c
index 7f1e7dd..476e7a8 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -884,7 +884,7 @@ int ril_request_dispatch(struct ril_request *request)
return 0;
}
-void *ril_request_loop(void *data)
+void *ril_request_loop(__attribute__((unused)) void *data)
{
struct ril_request *request;
int rc;
@@ -1449,8 +1449,9 @@ RIL_RadioFunctions ril_radio_functions = {
ril_get_version
};
-const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc,
- char **argv)
+const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env,
+ __attribute__((unused)) int argc,
+ __attribute__((unused)) char **argv)
{
RIL_RadioFunctions *radio_functions;
pthread_attr_t attr;
diff --git a/sim.c b/sim.c
index deb5956..705608e 100644
--- a/sim.c
+++ b/sim.c
@@ -258,7 +258,9 @@ int ipc_sec_pin_status(struct ipc_message *message)
return 0;
}
-int ril_request_get_sim_status(void *data, size_t size, RIL_Token token)
+int ril_request_get_sim_status(__attribute__((unused)) void *data,
+ __attribute__((unused)) size_t size,
+ RIL_Token token)
{
void *card_status_data;
size_t card_status_size;
--
2.21.0
More information about the Replicant
mailing list