summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f9400b)
raw | patch | inline | side by side (parent: 2f9400b)
author | Elliott Hughes <enh@google.com> | |
Tue, 3 Jun 2014 22:22:34 +0000 (15:22 -0700) | ||
committer | Elliott Hughes <enh@google.com> | |
Tue, 3 Jun 2014 22:22:34 +0000 (15:22 -0700) |
Change-Id: I023d2d8b547fbc21d4124bb7510d42b06a0dc501
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index cf3d692ac8d2287b00cb6a18240ddb492aeb7a6c..f9722ae86b38971ad1f330d866a11b679ecf7bc3 100644 (file)
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
benchmark_c_flags = \
-O2 \
- -Wall -Wextra \
+ -Wall -Wextra -Wunused \
-Werror \
-fno-builtin \
-std=gnu++11 \
diff --git a/libc/Android.mk b/libc/Android.mk
index 4783bd386e8c4b4baf7d7767488265f739b7628f..02fad3bce7fb5b5136cb01fb905f48588f3bb205 100644 (file)
--- a/libc/Android.mk
+++ b/libc/Android.mk
# ========================================================
libc_common_cflags := \
-D_LIBC=1 \
- -Wall -Wextra \
+ -Wall -Wextra -Wunused \
# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
libc_common_cflags += \
LOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files)
LOCAL_CFLAGS := \
$(libc_common_cflags) \
- -Wno-sign-compare -Wno-uninitialized \
+ -Wno-sign-compare -Wno-uninitialized -Wno-unused-parameter \
-Werror \
-I$(LOCAL_PATH)/upstream-openbsd/android/include \
-I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
index 659cf398ae8e95d5597a84852395e7fbfe32db71..7c463643b1dfeb90c5679eb1d6f39d73587ef565 100644 (file)
// Note that the dynamic linker has also run all constructors in the
// executable at this point.
__noreturn void __libc_init(void* raw_args,
- void (*onexit)(void),
+ void (*onexit)(void) __unused,
int (*slingshot)(int, char**, char**),
structors_array_t const * const structors) {
index e45422ed90b069045112cc89ab576ff84049070e..ab0b3a69f49cd5149a7b2c841cbb97bb10beed1f 100644 (file)
}
__noreturn void __libc_init(void* raw_args,
- void (*onexit)(void),
+ void (*onexit)(void) __unused,
int (*slingshot)(int, char**, char**),
structors_array_t const * const structors) {
KernelArgumentBlock args(raw_args);
diff --git a/libdl/Android.mk b/libdl/Android.mk
index 3d60474f037a796924513bf6bb045cc76c868aa6..cb1cb7d28ce724af3b5acc9e12448c1c340d0ee4 100644 (file)
--- a/libdl/Android.mk
+++ b/libdl/Android.mk
LOCAL_LDFLAGS_x86_64 := $(LOCAL_LDFLAGS_x86)
LOCAL_SRC_FILES:= libdl.c
-LOCAL_CFLAGS := -Wall -Wextra -Werror
+LOCAL_CFLAGS := -Wall -Wextra -Wunused -Werror
LOCAL_MODULE := libdl
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
diff --git a/linker/Android.mk b/linker/Android.mk
index d2bcfaf0b04d1c7a12ea8eec9e3f8862bf52236a..811cf6e8e7ea67316b1c5c85d58fe334d3825a88 100644 (file)
--- a/linker/Android.mk
+++ b/linker/Android.mk
-fno-stack-protector \
-Wstrict-overflow=5 \
-fvisibility=hidden \
- -Wall -Wextra -Werror \
+ -Wall -Wextra -Wunused -Werror \
LOCAL_CONLYFLAGS += \
-std=gnu99 \
diff --git a/linker/linked_list.h b/linker/linked_list.h
index a6bea6c8f4578b57ae6a9c31c5cc2eb67db70dc2..52af0f1108a2b8e26d41bd3e931031873001233a 100644 (file)
--- a/linker/linked_list.h
+++ b/linker/linked_list.h
template<typename F>
void remove_if(F&& predicate) {
- LinkedListEntry<T>* e = head_;
for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) {
if (e->element != nullptr && predicate(e->element)) {
e->element = nullptr;
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 98cb1789bba51f7ad2bd052bccc1059dd04c9438..5452f3011c76f16e124ead561457bc5acfb27ffa 100644 (file)
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
}
}
-soinfo* do_dlopen(const char* name, int flags, soinfo* caller, const android_dlextinfo* extinfo) {
+soinfo* do_dlopen(const char* name, int flags, soinfo* /*caller*/, const android_dlextinfo* extinfo) {
if ((flags & ~(RTLD_NOW|RTLD_LAZY|RTLD_LOCAL|RTLD_GLOBAL|RTLD_NOLOAD)) != 0) {
DL_ERR("invalid flags to dlopen: %x", flags);
return NULL;
index 831cfcb961a3085fd872d7fbafc266570b735169..683f9ee80237f323c15adf82076097b08035ba9b 100644 (file)
--- a/linker/tests/Android.mk
+++ b/linker/tests/Android.mk
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_CFLAGS += -g -Wall -Wextra -Werror -std=gnu++11
+LOCAL_CFLAGS += -g -Wall -Wextra -Wunused -Werror -std=gnu++11
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../libc/
LOCAL_SRC_FILES := \
diff --git a/tests/Android.mk b/tests/Android.mk
index db8dd8cc7b92f32fd1086f98bac47050fb05ddd5..811c12a5a4ff087ea95fd26a85dca74edcf1f2c5 100644 (file)
--- a/tests/Android.mk
+++ b/tests/Android.mk
test_cflags = \
-fstack-protector-all \
-g \
- -Wall -Wextra \
+ -Wall -Wextra -Wunused \
-Werror \
-fno-builtin \