diff options
author | Dan Stoza <stoza@google.com> | 2014-11-17 12:03:59 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-12-04 17:56:27 -0800 |
commit | d31824004277f554000417cea349d69f18655e95 (patch) | |
tree | 95b7a83c022ad88780a81a58243005db709bc28d /libs/ui/Fence.cpp | |
parent | 01049c8321aab30cd431e2febeddd79242ae5a4f (diff) | |
download | frameworks_native-d31824004277f554000417cea349d69f18655e95.zip frameworks_native-d31824004277f554000417cea349d69f18655e95.tar.gz frameworks_native-d31824004277f554000417cea349d69f18655e95.tar.bz2 |
libui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.
Change-Id: I470a267e9b1c373f2d5c960f005c3b0e02b2db63
(cherry picked from commit 303b9a51239d36d237a7d40c67b5085cdb3c1059)
Diffstat (limited to 'libs/ui/Fence.cpp')
-rw-r--r-- | libs/ui/Fence.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/ui/Fence.cpp b/libs/ui/Fence.cpp index 3c0306c..9cf2881 100644 --- a/libs/ui/Fence.cpp +++ b/libs/ui/Fence.cpp @@ -18,10 +18,13 @@ #define ATRACE_TAG ATRACE_TAG_GRAPHICS //#define LOG_NDEBUG 0 - // This is needed for stdint.h to define INT64_MAX in C++ - #define __STDC_LIMIT_MACROS - +// We would eliminate the non-conforming zero-length array, but we can't since +// this is effectively included from the Linux kernel +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wzero-length-array" #include <sync/sync.h> +#pragma clang diagnostic pop + #include <ui/Fence.h> #include <unistd.h> #include <utils/Log.h> @@ -45,7 +48,7 @@ Fence::~Fence() { } } -status_t Fence::wait(unsigned int timeout) { +status_t Fence::wait(int timeout) { ATRACE_CALL(); if (mFenceFd == -1) { return NO_ERROR; @@ -59,7 +62,7 @@ status_t Fence::waitForever(const char* logname) { if (mFenceFd == -1) { return NO_ERROR; } - unsigned int warningTimeout = 3000; + int warningTimeout = 3000; int err = sync_wait(mFenceFd, warningTimeout); if (err < 0 && errno == ETIME) { ALOGE("%s: fence %d didn't signal in %u ms", logname, mFenceFd, @@ -138,7 +141,7 @@ status_t Fence::flatten(void*& buffer, size_t& size, int*& fds, size_t& count) c if (size < getFlattenedSize() || count < getFdCount()) { return NO_MEMORY; } - FlattenableUtils::write(buffer, size, (uint32_t)getFdCount()); + FlattenableUtils::write(buffer, size, getFdCount()); if (isValid()) { *fds++ = mFenceFd; count--; |