Loading libutils/Android.mk +4 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ commonSources:= \ VectorImpl.cpp \ misc.cpp host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror ifeq ($(HOST_OS),windows) ifeq ($(strip $(USE_CYGWIN),),) Loading Loading @@ -99,6 +99,7 @@ LOCAL_SRC_FILES:= \ ifeq ($(TARGET_ARCH),mips) LOCAL_CFLAGS += -DALIGN_DOUBLE endif LOCAL_CFLAGS += -Werror LOCAL_C_INCLUDES += \ bionic/libc/private \ Loading Loading @@ -126,7 +127,8 @@ LOCAL_SHARED_LIBRARIES := \ libbacktrace \ libcutils \ libdl \ liblog \ liblog LOCAL_CFLAGS := -Werror include external/stlport/libstlport.mk Loading libutils/BlobCache.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace android { // BlobCache::Header::mMagicNumber value static const uint32_t blobCacheMagic = '_Bb$'; static const uint32_t blobCacheMagic = ('_' << 24) + ('B' << 16) + ('b' << 8) + '$'; // BlobCache::Header::mBlobCacheVersion value static const uint32_t blobCacheVersion = 1; Loading @@ -49,7 +49,7 @@ BlobCache::BlobCache(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize mRandState[1] = (now >> 16) & 0xFFFF; mRandState[2] = (now >> 32) & 0xFFFF; #endif ALOGV("initializing random seed using %lld", now); ALOGV("initializing random seed using %lld", (unsigned long long)now); } void BlobCache::set(const void* key, size_t keySize, const void* value, Loading libutils/FileMap.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,13 @@ #include <utils/FileMap.h> #include <utils/Log.h> #if defined(HAVE_WIN32_FILEMAP) && !defined(__USE_MINGW_ANSI_STDIO) # define PRId32 "I32d" # define PRIx32 "I32x" # define PRId64 "I64d" #else #include <inttypes.h> #endif #include <stdio.h> #include <stdlib.h> Loading Loading @@ -169,8 +175,8 @@ try_again: goto try_again; } ALOGE("mmap(%" PRId64 ",%zu) failed: %s\n", adjOffset, adjLength, strerror(errno)); ALOGE("mmap(%lld,%zu) failed: %s\n", (long long)adjOffset, adjLength, strerror(errno)); return false; } mBasePtr = ptr; Loading libutils/LinearAllocator.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public: : mNextPage(0) {} void* operator new(size_t size, void* buf) { return buf; } void* operator new(size_t /*size*/, void* buf) { return buf; } void* start() { return (void*) (((size_t)this) + sizeof(Page)); Loading @@ -103,7 +103,7 @@ public: } private: Page(const Page& other) {} Page(const Page& /*other*/) {} Page* mNextPage; }; Loading libutils/RefBase.cpp +17 −11 Original line number Diff line number Diff line Loading @@ -17,6 +17,14 @@ #define LOG_TAG "RefBase" // #define LOG_NDEBUG 0 #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include <typeinfo> #include <unistd.h> #include <utils/RefBase.h> #include <utils/Atomic.h> Loading @@ -24,13 +32,9 @@ #include <utils/Log.h> #include <utils/threads.h> #include <stdlib.h> #include <stdio.h> #include <typeinfo> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #ifndef __unused #define __unused __attribute__((__unused__)) #endif // compile with refcounting debugging enabled #define DEBUG_REFS 0 Loading Loading @@ -388,7 +392,7 @@ void RefBase::weakref_type::incWeak(const void* id) { weakref_impl* const impl = static_cast<weakref_impl*>(this); impl->addWeakRef(id); const int32_t c = android_atomic_inc(&impl->mWeak); const int32_t c __unused = android_atomic_inc(&impl->mWeak); ALOG_ASSERT(c >= 0, "incWeak called on %p after last weak ref", this); } Loading Loading @@ -615,7 +619,7 @@ void RefBase::onLastStrongRef(const void* /*id*/) { } bool RefBase::onIncStrongAttempted(uint32_t flags, const void* id) bool RefBase::onIncStrongAttempted(uint32_t flags, const void* /*id*/) { return (flags&FIRST_INC_STRONG) ? true : false; } Loading @@ -626,13 +630,15 @@ void RefBase::onLastWeakRef(const void* /*id*/) // --------------------------------------------------------------------------- void RefBase::renameRefs(size_t n, const ReferenceRenamer& renamer) { #if DEBUG_REFS void RefBase::renameRefs(size_t n, const ReferenceRenamer& renamer) { for (size_t i=0 ; i<n ; i++) { renamer(i); } #endif } #else void RefBase::renameRefs(size_t /*n*/, const ReferenceRenamer& /*renamer*/) { } #endif void RefBase::renameRefId(weakref_type* ref, const void* old_id, const void* new_id) { Loading Loading
libutils/Android.mk +4 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ commonSources:= \ VectorImpl.cpp \ misc.cpp host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror ifeq ($(HOST_OS),windows) ifeq ($(strip $(USE_CYGWIN),),) Loading Loading @@ -99,6 +99,7 @@ LOCAL_SRC_FILES:= \ ifeq ($(TARGET_ARCH),mips) LOCAL_CFLAGS += -DALIGN_DOUBLE endif LOCAL_CFLAGS += -Werror LOCAL_C_INCLUDES += \ bionic/libc/private \ Loading Loading @@ -126,7 +127,8 @@ LOCAL_SHARED_LIBRARIES := \ libbacktrace \ libcutils \ libdl \ liblog \ liblog LOCAL_CFLAGS := -Werror include external/stlport/libstlport.mk Loading
libutils/BlobCache.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace android { // BlobCache::Header::mMagicNumber value static const uint32_t blobCacheMagic = '_Bb$'; static const uint32_t blobCacheMagic = ('_' << 24) + ('B' << 16) + ('b' << 8) + '$'; // BlobCache::Header::mBlobCacheVersion value static const uint32_t blobCacheVersion = 1; Loading @@ -49,7 +49,7 @@ BlobCache::BlobCache(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize mRandState[1] = (now >> 16) & 0xFFFF; mRandState[2] = (now >> 32) & 0xFFFF; #endif ALOGV("initializing random seed using %lld", now); ALOGV("initializing random seed using %lld", (unsigned long long)now); } void BlobCache::set(const void* key, size_t keySize, const void* value, Loading
libutils/FileMap.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,13 @@ #include <utils/FileMap.h> #include <utils/Log.h> #if defined(HAVE_WIN32_FILEMAP) && !defined(__USE_MINGW_ANSI_STDIO) # define PRId32 "I32d" # define PRIx32 "I32x" # define PRId64 "I64d" #else #include <inttypes.h> #endif #include <stdio.h> #include <stdlib.h> Loading Loading @@ -169,8 +175,8 @@ try_again: goto try_again; } ALOGE("mmap(%" PRId64 ",%zu) failed: %s\n", adjOffset, adjLength, strerror(errno)); ALOGE("mmap(%lld,%zu) failed: %s\n", (long long)adjOffset, adjLength, strerror(errno)); return false; } mBasePtr = ptr; Loading
libutils/LinearAllocator.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public: : mNextPage(0) {} void* operator new(size_t size, void* buf) { return buf; } void* operator new(size_t /*size*/, void* buf) { return buf; } void* start() { return (void*) (((size_t)this) + sizeof(Page)); Loading @@ -103,7 +103,7 @@ public: } private: Page(const Page& other) {} Page(const Page& /*other*/) {} Page* mNextPage; }; Loading
libutils/RefBase.cpp +17 −11 Original line number Diff line number Diff line Loading @@ -17,6 +17,14 @@ #define LOG_TAG "RefBase" // #define LOG_NDEBUG 0 #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include <typeinfo> #include <unistd.h> #include <utils/RefBase.h> #include <utils/Atomic.h> Loading @@ -24,13 +32,9 @@ #include <utils/Log.h> #include <utils/threads.h> #include <stdlib.h> #include <stdio.h> #include <typeinfo> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #ifndef __unused #define __unused __attribute__((__unused__)) #endif // compile with refcounting debugging enabled #define DEBUG_REFS 0 Loading Loading @@ -388,7 +392,7 @@ void RefBase::weakref_type::incWeak(const void* id) { weakref_impl* const impl = static_cast<weakref_impl*>(this); impl->addWeakRef(id); const int32_t c = android_atomic_inc(&impl->mWeak); const int32_t c __unused = android_atomic_inc(&impl->mWeak); ALOG_ASSERT(c >= 0, "incWeak called on %p after last weak ref", this); } Loading Loading @@ -615,7 +619,7 @@ void RefBase::onLastStrongRef(const void* /*id*/) { } bool RefBase::onIncStrongAttempted(uint32_t flags, const void* id) bool RefBase::onIncStrongAttempted(uint32_t flags, const void* /*id*/) { return (flags&FIRST_INC_STRONG) ? true : false; } Loading @@ -626,13 +630,15 @@ void RefBase::onLastWeakRef(const void* /*id*/) // --------------------------------------------------------------------------- void RefBase::renameRefs(size_t n, const ReferenceRenamer& renamer) { #if DEBUG_REFS void RefBase::renameRefs(size_t n, const ReferenceRenamer& renamer) { for (size_t i=0 ; i<n ; i++) { renamer(i); } #endif } #else void RefBase::renameRefs(size_t /*n*/, const ReferenceRenamer& /*renamer*/) { } #endif void RefBase::renameRefId(weakref_type* ref, const void* old_id, const void* new_id) { Loading