summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-05-30 21:47:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-30 21:47:19 +0000
commit6ed77c130d80fe607ec91ada4cf5718d512b4ad5 (patch)
treea0be7b3f8e417dc3872ee07856a2a9704b10f359 /media
parent215f7b91ed831e6d37909ead1119dcde13d50895 (diff)
parent2d0e8d8f75369b491362f2ea3a6efd5159df404c (diff)
downloadframeworks_av-6ed77c130d80fe607ec91ada4cf5718d512b4ad5.zip
frameworks_av-6ed77c130d80fe607ec91ada4cf5718d512b4ad5.tar.gz
frameworks_av-6ed77c130d80fe607ec91ada4cf5718d512b4ad5.tar.bz2
am 2d0e8d8f: Merge "libcpustats: Turn on -Werror"
* commit '2d0e8d8f75369b491362f2ea3a6efd5159df404c': libcpustats: Turn on -Werror
Diffstat (limited to 'media')
-rw-r--r--media/libcpustats/Android.mk4
-rw-r--r--media/libcpustats/ThreadCpuUsage.cpp3
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';