summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aurimas Liutikas <aurimas@google.com> 2016-02-18 17:48:22 -0800
committer Aurimas Liutikas <aurimas@google.com> 2016-02-18 17:48:22 -0800
commitd3b4c050f6bcdfd44bfb9c8ed885fd1c482c50bb (patch)
tree1f03f534822a164eee706ae1ac033837023182d8
parent07320bc921103c6b3253555ea9c75c5775a2872b (diff)
Fix warnings in servicemanager and KeyCharacterMap
- Suppress unused parameter warnings. - Remove a few unused parameters. - Set the correct formatting for size_t log. Bug: 26936282 Change-Id: I2e2acb15d1bc05c6ba09563a87d5baceebe7ebd9
-rw-r--r--cmds/servicemanager/Android.mk2
-rw-r--r--cmds/servicemanager/binder.c2
-rw-r--r--cmds/servicemanager/service_manager.c8
-rw-r--r--libs/input/KeyCharacterMap.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/cmds/servicemanager/Android.mk b/cmds/servicemanager/Android.mk
index 7ee0dd184e..73c036722b 100644
--- a/cmds/servicemanager/Android.mk
+++ b/cmds/servicemanager/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH:= $(call my-dir)
svc_c_flags = \
- -Wall -Wextra \
+ -Wall -Wextra -Werror \
ifneq ($(TARGET_USES_64_BIT_BINDER),true)
ifneq ($(TARGET_IS_64_BIT),true)
diff --git a/cmds/servicemanager/binder.c b/cmds/servicemanager/binder.c
index 3d14451b2f..9e99085c57 100644
--- a/cmds/servicemanager/binder.c
+++ b/cmds/servicemanager/binder.c
@@ -449,7 +449,7 @@ static void *bio_alloc(struct binder_io *bio, size_t size)
}
void binder_done(struct binder_state *bs,
- struct binder_io *msg,
+ __unused struct binder_io *msg,
struct binder_io *reply)
{
struct {
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 8596f962bd..21fdff0f0f 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -178,7 +178,7 @@ uint16_t svcmgr_id[] = {
};
-uint32_t do_find_service(struct binder_state *bs, const uint16_t *s, size_t len, uid_t uid, pid_t spid)
+uint32_t do_find_service(const uint16_t *s, size_t len, uid_t uid, pid_t spid)
{
struct svcinfo *si = find_svc(s, len);
@@ -304,7 +304,7 @@ int svcmgr_handler(struct binder_state *bs,
if (s == NULL) {
return -1;
}
- handle = do_find_service(bs, s, len, txn->sender_euid, txn->sender_pid);
+ handle = do_find_service(s, len, txn->sender_euid, txn->sender_pid);
if (!handle)
break;
bio_put_ref(reply, handle);
@@ -349,7 +349,7 @@ int svcmgr_handler(struct binder_state *bs,
}
-static int audit_callback(void *data, security_class_t cls, char *buf, size_t len)
+static int audit_callback(void *data, __unused security_class_t cls, char *buf, size_t len)
{
struct audit_data *ad = (struct audit_data *)data;
@@ -362,7 +362,7 @@ static int audit_callback(void *data, security_class_t cls, char *buf, size_t le
return 0;
}
-int main(int argc, char **argv)
+int main()
{
struct binder_state *bs;
diff --git a/libs/input/KeyCharacterMap.cpp b/libs/input/KeyCharacterMap.cpp
index fe649fb548..0627ca6d6f 100644
--- a/libs/input/KeyCharacterMap.cpp
+++ b/libs/input/KeyCharacterMap.cpp
@@ -608,7 +608,7 @@ sp<KeyCharacterMap> KeyCharacterMap::readFromParcel(Parcel* parcel) {
return NULL;
}
if (numKeys > MAX_KEYS) {
- ALOGE("Too many keys in KeyCharacterMap (%d > %d)", numKeys, MAX_KEYS);
+ ALOGE("Too many keys in KeyCharacterMap (%zu > %d)", numKeys, MAX_KEYS);
return NULL;
}