diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-05-30 13:30:18 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-05-30 13:32:02 -0700 |
commit | fc3afda925f4b493ef68a745fdd753d9330316ad (patch) | |
tree | fb442d3c90d82fa7e5e8ac0c1813d05d67764196 | |
parent | df9b1ff3726e263c8533add096435520ca4b7d61 (diff) | |
download | frameworks_av-fc3afda925f4b493ef68a745fdd753d9330316ad.zip frameworks_av-fc3afda925f4b493ef68a745fdd753d9330316ad.tar.gz frameworks_av-fc3afda925f4b493ef68a745fdd753d9330316ad.tar.bz2 |
libcpustats: Turn on -Werror
- Switch to static_assert from deprecated utils/Debug.h
- Turn on C++11 standard
- Turn on -Werror
Change-Id: I4f1c08bbcaf1ad3a97502cde756a2f42bcece789
-rw-r--r-- | media/libcpustats/Android.mk | 4 | ||||
-rw-r--r-- | media/libcpustats/ThreadCpuUsage.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/media/libcpustats/Android.mk b/media/libcpustats/Android.mk index b506353..ee283a6 100644 --- a/media/libcpustats/Android.mk +++ b/media/libcpustats/Android.mk @@ -1,4 +1,4 @@ -LOCAL_PATH:= $(call my-dir) +LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -8,4 +8,6 @@ LOCAL_SRC_FILES := \ LOCAL_MODULE := libcpustats +LOCAL_CFLAGS := -std=gnu++11 -Werror + include $(BUILD_STATIC_LIBRARY) diff --git a/media/libcpustats/ThreadCpuUsage.cpp b/media/libcpustats/ThreadCpuUsage.cpp index 637402a..cfdcb51 100644 --- a/media/libcpustats/ThreadCpuUsage.cpp +++ b/media/libcpustats/ThreadCpuUsage.cpp @@ -21,7 +21,6 @@ #include <stdlib.h> #include <time.h> -#include <utils/Debug.h> #include <utils/Log.h> #include <cpustats/ThreadCpuUsage.h> @@ -218,7 +217,7 @@ uint32_t ThreadCpuUsage::getCpukHz(int cpuNum) #define FREQ_SIZE 64 char freq_path[FREQ_SIZE]; #define FREQ_DIGIT 27 - COMPILE_TIME_ASSERT_FUNCTION_SCOPE(MAX_CPU <= 10); + static_assert(MAX_CPU <= 10, "MAX_CPU too large"); #define FREQ_PATH "/sys/devices/system/cpu/cpu?/cpufreq/scaling_cur_freq" strlcpy(freq_path, FREQ_PATH, sizeof(freq_path)); freq_path[FREQ_DIGIT] = cpuNum + '0'; |