Fix code warning.
Change-Id: Ib11fb49f528d3688351ae349d5b4e307c28b3967
diff --git a/mbtk/test/libmbtk_ril/mbtk_info_test.c b/mbtk/test/libmbtk_ril/mbtk_info_test.c
index 116fd4f..5f6135c 100755
--- a/mbtk/test/libmbtk_ril/mbtk_info_test.c
+++ b/mbtk/test/libmbtk_ril/mbtk_info_test.c
@@ -108,7 +108,7 @@
uint8 *ptr = (uint8*)data;
printf("3sms_state_change_cb() : %s\n", ptr);
- struct SMS_Struct s = PDUDecoding(ptr);
+ struct SMS_Struct s = PDUDecoding((char*)ptr);
printf("服务中心地址: %s\n", s.SCA);
printf("发送方地址: %s\n", s.OA);
printf("服务中心时间戳: %s\n", s.SCTS);
@@ -134,9 +134,10 @@
#include <netinet/in.h>
#include <arpa/inet.h>
+#if 0
static void test2(int is_ipv6, char *ip)
{
- char ipaddr[20] = {0};
+// char ipaddr[20] = {0};
if(is_ipv6) {
struct in6_addr sin_addr;
if(inet_pton(AF_INET6, ip, &sin_addr) < 0) {
@@ -153,6 +154,7 @@
}
}
}
+#endif
static void help()
@@ -414,7 +416,7 @@
{
printf("ptr == NULL\n");
list_node_t* cell_list = NULL;
- int type;
+ mbtk_cell_type_enum type;
err = mbtk_cell_get(info_handle, &type, &cell_list);
if(err || cell_list == NULL) {
printf("Error : %d\n", err);
@@ -619,7 +621,7 @@
printf("Call success.\n");
}
} else if(!strncasecmp(cmd, "hangup", 6)){
- int phone_id;
+ int phone_id = 1;
if(!strcasecmp(cmd, "hangup")) { // hang up all
err = mbtk_call_hang(info_handle);
if(err) {
@@ -821,7 +823,7 @@
printf("APN Num:%d\n", apn_num);
int i = 0;
while(i < apn_num) {
- printf("APN : %d, %s, %s\n", apns[i].cid, apn2str(apns[i].ip_type), apns[i].apn);
+ printf("APN : %d, %d, %s\n", apns[i].cid, apns[i].ip_type, apns[i].apn);
i++;
}
}
@@ -1000,7 +1002,7 @@
char mem[100] = {0};
char resp[100] = {0};
if(!strcasecmp(cmd, "cpms")) { // Get
- err = mbtk_sms_cpms_get(info_handle, &mem);
+ err = mbtk_sms_cpms_get(info_handle, mem);
if(err) {
printf("Error : %d\n", err);
} else {
@@ -1317,7 +1319,7 @@
#if 1
while(1)
{
- sleep(1000 * 365 * 24 * 60 * 60);
+ sleep(365 * 24 * 60 * 60);
}
#else
sleep(1);