From f0c8ca7f09ed9a827e5c79e019526e8f2c77eeb4 Mon Sep 17 00:00:00 2001 From: Sanket Padawe Date: Thu, 30 Jun 2016 15:01:08 -0700 Subject: Fix build warnings in hardware/ril. Bug: 29401612 Change-Id: I8473294655ad24ec001cedb84856004ab0ba22a7 --- rild/rild.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rild') diff --git a/rild/rild.c b/rild/rild.c index 0e0d056..ce1adba 100644 --- a/rild/rild.c +++ b/rild/rild.c @@ -147,8 +147,8 @@ int main(int argc, char **argv) { 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]; @@ -223,7 +223,7 @@ int main(int argc, char **argv) { 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; @@ -339,7 +339,7 @@ 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) { -- cgit v1.2.3