Some methods in header files of classes using SharedBuffer need
to be moved to the implementation files accordingly
Change-Id: I891f3ace2b940ab219e4e449040bfed71c0547db
* Hashing functions rely on integer overflow behavior.
Mark those functions as safe.
* abort() if a passed in size_t value is greater than
UINT32_MAX. This can occur on 64 bit builds where size_t
is larger than uint32_t.
* Special case the index lookup for an empty sorted vector.
Without the special case, size() == 0, and size()-1 underflows.
Change-Id: I343a14b589fc8f0d221c1998ae5d6f0b9e2781f8
When decrementing "n", eventually n will equal zero. When that
happens, n-- underflows. This causes a crash when code which uses
clang's -fsanitize=unsigned-integer-overflow is run.
Avoid trigging an unsigned integer underflow.
Change-Id: I9705be6580d61a164ef5fb1ec77e98a69d888438
Nobody ever called acquire() so release() was always
equivalent to delete. Just use delete instead so that
people can use unique_ptr directly (or shared_ptr if
they really want refcounts).
Change-Id: I9e3ad5e0f6a4fcc4e02e5a2ff7ef9514fe234415
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.
I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...
Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
system/core/include/utils/Mutex.h:134:25: error: non-constant-expression
cannot be narrowed from type 'long long' to '__kernel_time_t' (aka
'long') in initializer list [-Wc++11-narrowing]
system/core/include/utils/Mutex.h:135:26: error: non-constant-expression
cannot be narrowed from type 'long long' to 'long' in initializer list
[-Wc++11-narrowing]
Change-Id: Icb9df26aeb01617da5ab1c36987289f7c2b11954
This is not available for host builds because OSX doesn't have
pthread_mutex_timedlock() or equivalent.
Bug: 18842510
Change-Id: I072e74ab1a6f770fd245828b39c5f954dda1113b
The ANDROID_SINGLETON_STATIC_INSTANCE is used in some files
out of the android namespace. If it does not use full qualified
names, users of this macro will need to use it inside the 'android'
namespace to avoid warnings from clang compiler.
Change-Id: Ie4d4ba2b57fdc72d0deb3b7c2326304a44a1300f
As well intentioned as these were, uint16_t and C++11's char16_t are
_not_ actually compatible. They are not implicitly convertible, and
they mangle differently, so they are not even ABI compatible. In our
now wonderous world of C++11, no one should be using these, so just
kill them.
Bug: 18300613
Change-Id: I06d92d7f1d937dd94a620874323d4c50eb6a31bd
Needed for cases where something should be constexpr if possible, but
not being constexpr is fine if in pre-C++11 code (such as a const
static float member variable).
Bug: 18466763
Change-Id: I635d062575ba2fbc4cbe3a89f730128c404d95e1
Files that included FileMap.h (possibly transitively), before including
ByteOrder.h (which pulls in winsock2.h directly), will experience a
compiler warning/error from the latest mingw headers. This happens because
the headers require that winsock2.h come before windows.h in all cases.
The simplest (and most error-proof) fix for now is to include winsock2.h
before this use of windows.h.
Change-Id: I33069e4c9962d9820d0ea5976554f89d7ff6307c
libc++ also defines these types for pre-C++11, and the two definitions
need to match to avoid redefinition errors.
Bug: 18300613
Change-Id: I1e9198d39f7c470f37bc6edba2dca2d499f54c9b
This patch makes the Renamer class destructor virtual and fixes
the incorrect constructor initialization list ordering.
These issues and related compiler warnings have been suppressed
by the build system which uses the gcc isystem command
line option, unless a project explicitly adds the include the path
system/core/include to Android.mk and uses the templates.
Change-Id: Iff76a655eb8bd547adfe994c7315a005e98aed41
Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>