diff options
-rw-r--r-- | sources/android/cpufeatures/Android.mk | 1 | ||||
-rw-r--r-- | sources/android/cpufeatures/cpu-features.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sources/android/cpufeatures/Android.mk b/sources/android/cpufeatures/Android.mk index 46044716f..7c453fabe 100644 --- a/sources/android/cpufeatures/Android.mk +++ b/sources/android/cpufeatures/Android.mk @@ -14,6 +14,7 @@ else # NDK build system include $(CLEAR_VARS) LOCAL_MODULE := cpufeatures LOCAL_SRC_FILES := cpu-features.c +LOCAL_CFLAGS := -Wall -Wextra -Werror LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_LDLIBS := -ldl include $(BUILD_STATIC_LIBRARY) diff --git a/sources/android/cpufeatures/cpu-features.c b/sources/android/cpufeatures/cpu-features.c index 06cfa0b63..b2069c021 100644 --- a/sources/android/cpufeatures/cpu-features.c +++ b/sources/android/cpufeatures/cpu-features.c @@ -198,6 +198,7 @@ read_file(const char* pathname, char* buffer, size_t buffsize) return count; } +#ifdef __arm__ /* Extract the content of a the first occurence of a given field in * the content of /proc/cpuinfo and return it as a heap-allocated * string that must be freed by the caller. @@ -283,6 +284,7 @@ has_list_item(const char* list, const char* item) } return 0; } +#endif /* __arm__ */ /* Parse a number starting from 'input', but not going further * than 'limit'. Return the value into '*result'. @@ -327,11 +329,13 @@ parse_decimal(const char* input, const char* limit, int* result) return parse_number(input, limit, 10, result); } +#ifdef __arm__ static const char* parse_hexadecimal(const char* input, const char* limit, int* result) { return parse_number(input, limit, 16, result); } +#endif /* __arm__ */ /* This small data type is used to represent a CPU list / mask, as read * from sysfs on Linux. See http://www.kernel.org/doc/Documentation/cputopology.txt |