#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>
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 );
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);
}
-static void *readerLoop(void *arg)
+static void *readerLoop(void *arg __unused)
{
for (;;) {
const char * line;
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;
{ // ci[0]
1, // cellInfoType
1, // registered
+ RIL_TIMESTAMP_TYPE_MODEM,
curTime - 1000, // Fake some time in the past
{ // union CellInfo
{ // RIL_CellInfoGsm gsm
s_mnc, // mnc
s_lac, // lac
s_cid, // cid
- 0 // psc
},
{ // gsm.signalStrengthGsm
10, // signalStrength
}
-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.
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");
char **rilArgv;
void *dlHandle;
const RIL_RadioFunctions *(*rilInit)(const struct RIL_Env *, int, char **);
- const RIL_RadioFunctions *(*rilUimInit)(const struct RIL_Env *, int, char **);
- char *err_str = NULL;
+ RIL_RadioFunctions *(*rilUimInit)(const struct RIL_Env *, int, char **);
+ const char *err_str = NULL;
const RIL_RadioFunctions *funcs;
char libPath[PROPERTY_VALUE_MAX];
goto OpenLib;
}
- if (st.st_size > sizeof(buffer) - 1) {
+ if ((unsigned long)st.st_size > sizeof(buffer) - 1) {
RLOGE("Size of /proc/cmdline exceeds buffer");
close(fd);
goto OpenLib;
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) {