[Replicant] [PATCH ][V2] Remove unused variables
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Wed Jun 19 12:48:56 UTC 2019
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
call.c | 1 -
data.c | 8 ++------
network.c | 2 --
oem.c | 1 -
samsung-ril.c | 4 ----
sim.c | 1 -
sms.c | 1 -
srs.c | 5 -----
8 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/call.c b/call.c
index 6a3ffb9..adb8316 100644
--- a/call.c
+++ b/call.c
@@ -265,7 +265,6 @@ int ipc_call_list(struct ipc_message *message)
unsigned char count;
unsigned char index;
char *number;
- int rc;
if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_call_list_header))
return -1;
diff --git a/data.c b/data.c
index 6648728..dd43071 100644
--- a/data.c
+++ b/data.c
@@ -75,7 +75,6 @@ int ril_data_connection_register(unsigned int cid, char *apn, char *username,
struct ril_data_connection *data_connection;
struct list_head *list_end;
struct list_head *list;
- unsigned int i;
if (apn == NULL || ril_data == NULL)
return -1;
@@ -103,7 +102,6 @@ int ril_data_connection_register(unsigned int cid, char *apn, char *username,
int ril_data_connection_unregister(struct ril_data_connection *data_connection)
{
struct list_head *list;
- unsigned int i;
if (data_connection == NULL || ril_data == NULL)
return -1;
@@ -459,7 +457,6 @@ int ril_request_setup_data_call(void *data, size_t size, RIL_Token token)
char *username = NULL;
char *password = NULL;
char **values = NULL;
- unsigned int i;
int rc;
if (data == NULL || size < 6 * sizeof(char *))
@@ -728,7 +725,6 @@ int ril_request_deactivate_data_call(void *data, size_t size, RIL_Token token)
struct ril_request *request;
char **values = NULL;
unsigned int cid;
- unsigned int i;
int rc;
if (data == NULL || size < 2 * sizeof(char *))
@@ -872,12 +868,12 @@ int ipc_gprs_call_status(struct ipc_message *message)
RIL_Data_Call_Response_v6 response;
#else
char *setup_data_call_response[3];
+ int fail_cause;
+ unsigned int i;
#endif
struct ipc_gprs_call_status_data *data;
struct ril_data_connection *data_connection;
struct ril_request *request;
- int fail_cause;
- unsigned int i;
int rc;
if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_gprs_call_status_data))
diff --git a/network.c b/network.c
index 9295ea7..c7f666e 100644
--- a/network.c
+++ b/network.c
@@ -74,7 +74,6 @@ int ipc2ril_disp_icon_info(struct ipc_disp_icon_info_response_data *data,
int asu_bars[] = { 1, 3, 5, 8, 12, 15 };
unsigned int asu_bars_count = sizeof(asu_bars) / sizeof(int);
unsigned char asu_bars_index;
- int rc;
if (data == NULL || strength == NULL)
return -1;
@@ -738,7 +737,6 @@ int ipc_net_plmn_list(struct ipc_message *message)
char **network;
unsigned char count;
unsigned char index;
- unsigned int i;
int rc;
if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_net_plmn_list_header))
diff --git a/oem.c b/oem.c
index c1a3473..b9fba81 100644
--- a/oem.c
+++ b/oem.c
@@ -35,7 +35,6 @@ int ipc_svc_display_screen(struct ipc_message *message)
void *screen_data = NULL;
size_t screen_size = 0;
unsigned char count;
- int rc;
if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_svc_display_screen_header))
return -1;
diff --git a/samsung-ril.c b/samsung-ril.c
index a9ad7b3..6eee5e8 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -869,7 +869,6 @@ int ril_request_dispatch(struct ril_request *request)
{
unsigned int i;
int status;
- int rc;
if (request == NULL || ril_data == NULL)
return -1;
@@ -955,7 +954,6 @@ int ril_request_data_register(int request, void *data, size_t size)
struct ril_request_data *request_data;
struct list_head *list_end;
struct list_head *list;
- unsigned int i;
if (data == NULL || ril_data == NULL)
return -1;
@@ -980,7 +978,6 @@ int ril_request_data_register(int request, void *data, size_t size)
int ril_request_data_unregister(struct ril_request_data *request_data)
{
struct list_head *list;
- unsigned int i;
if (request_data == NULL || ril_data == NULL)
return -1;
@@ -1148,7 +1145,6 @@ int ril_radio_state_update(RIL_RadioState radio_state)
{
struct ril_request *request;
unsigned int i;
- int rc;
if (ril_data == NULL)
return -1;
diff --git a/sim.c b/sim.c
index c59aa40..e82ac19 100644
--- a/sim.c
+++ b/sim.c
@@ -60,7 +60,6 @@ RIL_RadioState ipc2ril_sec_pin_status_response(struct ipc_sec_pin_status_respons
RIL_RadioState radio_state;
unsigned int index;
unsigned int count;
- unsigned int i;
if (data == NULL || card_status == NULL)
return 0;
diff --git a/sms.c b/sms.c
index 85fc950..1c5d302 100644
--- a/sms.c
+++ b/sms.c
@@ -200,7 +200,6 @@ int ril_request_send_sms(void *data, size_t size, RIL_Token token)
size_t smsc_size = 0;
void *pdu = NULL;
size_t pdu_size = 0;
- unsigned int i;
int rc;
if (data == NULL || size < 2 * sizeof(char *))
diff --git a/srs.c b/srs.c
index 89a7ee8..4a11564 100644
--- a/srs.c
+++ b/srs.c
@@ -131,7 +131,6 @@ int srs_send(unsigned short command, const void *data, size_t size)
{
struct ril_client *ril_client;
struct srs_data *srs_data;
- struct srs_client *client;
struct srs_message message;
int rc;
@@ -191,7 +190,6 @@ int srs_control_ping(struct srs_message *message)
int srs_test_set_radio_state(struct srs_message *message)
{
struct srs_test_set_radio_state_data *data;
- int rc;
if (message == NULL || message->data == NULL || message->size < sizeof(struct srs_test_set_radio_state_data))
return -1;
@@ -642,7 +640,6 @@ int srs_server_close(struct ril_client *ril_client)
{
struct srs_data *data;
struct srs_client *client;
- eventfd_t event;
int rc;
if (ril_client == NULL || ril_client->data == NULL)
@@ -957,8 +954,6 @@ complete:
int srs_close(struct ril_client *ril_client)
{
struct srs_data *data;
- struct srs_client *client;
- eventfd_t event;
int rc;
if (ril_client == NULL || ril_client->data == NULL)
--
2.21.0
More information about the Replicant
mailing list