Merge commit \'f0c8ca7f09ed9a827e5c79e019526e8f2c77eeb4\' into manual_merge_f0c8ca7
am: 40be36d427
Change-Id: I5b191e1e741a0649a7ba84b15c8ccceda762b5d4
diff --git a/libril/RilSapSocket.cpp b/libril/RilSapSocket.cpp
index 3a66f8c..92b5e67 100644
--- a/libril/RilSapSocket.cpp
+++ b/libril/RilSapSocket.cpp
@@ -21,6 +21,7 @@
#include "RilSapSocket.h"
#include "pb_decode.h"
#include "pb_encode.h"
+#undef LOG_TAG
#define LOG_TAG "RIL_UIM_SOCKET"
#include <utils/Log.h>
#include <arpa/inet.h>
@@ -353,8 +354,8 @@
success = pb_encode(&ostream, MsgHeader_fields, hdr);
if (success) {
- RLOGD("Size: %d (0x%x) Size as written: 0x%x", encoded_size, encoded_size,
- written_size);
+ RLOGD("Size: %zu (0x%zx) Size as written: 0x%x", encoded_size,
+ encoded_size, written_size);
log_hex("onRequestComplete", &buffer[sizeof(written_size)], encoded_size);
RLOGI("[%d] < SAP RESPONSE type: %d. id: %d. error: %d",
hdr->token, hdr->type, hdr->id,hdr->error );
@@ -365,12 +366,12 @@
RLOGD("Write successful");
}
} else {
- RLOGE("Error while encoding response of type %d id %d buffer_size: %d: %s.",
- hdr->type, hdr->id, buffer_size, PB_GET_ERROR(&ostream));
+ RLOGE("Error while encoding response of type %d id %d buffer_size: %zu: %s.",
+ hdr->type, hdr->id, buffer_size, PB_GET_ERROR(&ostream));
}
} else {
- RLOGE("Not sending response type %d: encoded_size: %u. commandFd: %d. encoded size result: %d",
- hdr->type, encoded_size, commandFd, success);
+ RLOGE("Not sending response type %d: encoded_size: %zu. commandFd: %d. encoded size result:\
+ %d", hdr->type, encoded_size, commandFd, success);
}
pthread_mutex_unlock(&write_lock);
diff --git a/reference-ril/atchannel.c b/reference-ril/atchannel.c
index 84e8c37..5dc3e3c 100644
--- a/reference-ril/atchannel.c
+++ b/reference-ril/atchannel.c
@@ -422,7 +422,7 @@
}
-static void *readerLoop(void *arg)
+static void *readerLoop(void *arg __unused)
{
for (;;) {
const char * line;
diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c
index dc85529..a2525bc 100644
--- a/reference-ril/reference-ril.c
+++ b/reference-ril/reference-ril.c
@@ -375,7 +375,7 @@
at_send_command("AT+CNMI=1,2,2,1,1", NULL);
}
-static void requestRadioPower(void *data, size_t datalen, RIL_Token t)
+static void requestRadioPower(void *data, size_t datalen __unused, RIL_Token t)
{
int onOff;
@@ -1945,6 +1945,7 @@
{ // ci[0]
1, // cellInfoType
1, // registered
+ RIL_TIMESTAMP_TYPE_MODEM,
curTime - 1000, // Fake some time in the past
{ // union CellInfo
{ // RIL_CellInfoGsm gsm
@@ -1953,7 +1954,6 @@
s_mnc, // mnc
s_lac, // lac
s_cid, // cid
- 0 // psc
},
{ // gsm.signalStrengthGsm
10, // signalStrength
@@ -1968,7 +1968,7 @@
}
-static void requestSetCellInfoListRate(void *data, size_t datalen, RIL_Token t)
+static void requestSetCellInfoListRate(void *data, size_t datalen __unused, RIL_Token t)
{
// For now we'll save the rate but no RIL_UNSOL_CELL_INFO_LIST messages
// will be sent.
@@ -3286,7 +3286,7 @@
RIL_onUnsolicitedResponse(RIL_UNSOL_HARDWARE_CONFIG_CHANGED, cfg, num*sizeof(*cfg));
}
-static void usage(char *s)
+static void usage(char *s __unused)
{
#ifdef RIL_SHLIB
fprintf(stderr, "reference-ril requires: -p <tcp port> or -d /dev/tty_device\n");
diff --git a/rild/rild.c b/rild/rild.c
index 7bd525f..b113cb0 100644
--- a/rild/rild.c
+++ b/rild/rild.c
@@ -126,7 +126,7 @@
char **rilArgv;
void *dlHandle;
const RIL_RadioFunctions *(*rilInit)(const struct RIL_Env *, int, char **);
- const RIL_RadioFunctions *(*rilUimInit)(const struct RIL_Env *, int, char **);
+ RIL_RadioFunctions *(*rilUimInit)(const struct RIL_Env *, int, char **);
const char *err_str = NULL;
const RIL_RadioFunctions *funcs;
@@ -198,7 +198,7 @@
dlerror(); // Clear any previous dlerror
rilUimInit =
- (const RIL_RadioFunctions *(*)(const struct RIL_Env *, int, char **))
+ (RIL_RadioFunctions *(*)(const struct RIL_Env *, int, char **))
dlsym(dlHandle, "RIL_SAP_Init");
err_str = dlerror();
if (err_str) {