system/core/include is included in the global include path using
-isystem, which hides all warnings. Fix warnings in libutils
headers in preparation for moving from -isystem to -I.
- Fix implicit cast from int64_t to long in Condition.h. Remove
the __LP64__ check and always compare against LONG_MAX before
casting.
- Fix implicit cast from size_t to ssize_t in KeyedVector.h
- Fix -Wshadow-field-in-constructor warnings in Looper.h and RefBase.h
- Move destructors for MessageHandler and LooperCallback to Looper.cpp
and ReferenceRenamer and VirtualLightRefBase to RefBase.cpp to prevent
vtables in every compilation unit.
- Declare template variables in Singleton.h
- Fix old-style casts in StrongPointer.h and TypeHelpers.h
- Use template metaprogramming in TypeHelpers.h to avoid warnings on
memmove on non-trivial types.
- Add an assignment operator to key_value_pair_t to complete
rule-of-three
- Use memcpy instead of dereferencing a reinterpret_casted pointer to
treat the bits of a float or double as int32_t or int64_t
- Escape unicode sequences inside doxygen comments between \code and
\endcode
- Remove WIN32 ZD definition in Compat.h, %zd works fine with mingw
- Fix WIN32 printf warnings in Filemap.cpp
- Initialize mNullValue with 0 in LruCache.h, some of the tests use a
non-pointer type for TValue.
Test: m -j native
Bug: 31492149
Change-Id: I385a05a3ca01258e44fe3b37ef77e4aaff547b26
Vector<T> objects are a dynamic type with a vtable, which is not
trivially moveable.
Impact on aapt for frameworks-res is negligible, ~3%.
Bug: 31595853
Test: m -j framework-res
Change-Id: I8a3269c35d95affb6e86d60588bcfca46db7f445
Now it always connects to multiple address of same host and just
return one socket while other sockets get leaked.
Also, it cause trouble on machine with dual stack.
adb connect localhost:* just connect to IPv4 and IPv6 at same time
and finally it doesn't work since emulator can only handle one adb
connection.
To test this, start an emulator with non-standar port and killall adb
daemon on linux work station and then do following test.
Test: adb connect localhost:12345;lsof -n -p `pgrep adb`
Change-Id: I1e0f6824efc1db8e179377de068e3b5535aff3f7
system/core/include is included in the global include path using
-isystem, which hides all warnings. Fix warnings in
system/core/include/system in preparation for moving from -isystem to -I.
- Fix invalid doxygen syntax in graphics.h
- Use a pragma to hide a C99 extension warning on the flexible length
array in graphics.h
- Make static functions in radio.h static inline
- Fix size_t printf and size_t vs. ssize_t comparision in qemu_pipe.h
- Fix old style cast in window.h
Test: m -j native
Bug: 31492149
Change-Id: I857f289e4c8e303494831873282bbb69de155c10
system/core/include is included in the global include path using
-isystem, which hides all warnings. cutils/trace.h has an ignored
return value warning, move the implementation to trace-dev.c so it
doesn't cause warnings in every module that includes it in preparation
for moving from -isystem to -I.
Test: m -j native
Bug: 31492149
Change-Id: If8b3fe13059c9e59c2d5208294d427d84fa6e588
Now that we have support for std::mutex and std::condition_variable on
Windows, remove our mutex compatibility layer in favor of the C++ one.
Bug: http://b/31653591
Test: mma && $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test && \
python test_adb.py && python test_device.py
(also on Windows)
Change-Id: I5b7ed9c45cc2a32edcf4e77b56dc28e441f15f34
Parameter is implicily converted to unsigned when assigned to the struct,
so make sure users are aware of this.
Test: compiled
Change-Id: I25ca6b24591497aa4e7ce8db262ce1099c2b7b09
If the calling process has already been a leading process of session.
setsid just fail with EPERM, ignore such error.
Test: killall adb;exec 3>f;adb fork-server server --reply-fd 3 & cat f
Change-Id: I1aeac079f29e10aa63ed724b5a43663f25c25ad5
Signed-off-by: Tao Wu <lepton@google.com>
system/core/include is included in the global include path using
-isystem, which hides all warnings. zlib.h is included through
system/core/include/ziparchive/zip_archive.h, which was hiding warnings
in it. Use a #pragma around the call to deflateInit2, it is a macro
that expands to an old-style cast, in preparation for moving from
-isystem to -I. Also move the ZipString constructor to zip_archive.cc
so it can assert on the length of the string parameter and fix an
implicit conversion from size_t to uint16_t.
Test: m -j native
Bug: 31492149
Change-Id: I74cdad7fe9c723859b5cfbea73c8f27d9d9ca265
system/core/include is included in the global include path using
-isystem, which hides all warnings. Fix warnings in log/log.h
in preparation for moving from -isystem to -I.
log/log.h uses gnu extensions for zero-argument variadic macro token
pasting, which clang warns about with -Weverything. Hide the warnings
using pragmas.
Test: m -j native
Bug: 31492149
Change-Id: Ib2113f877d811a6ecc0e91c035640b506f04bd86
It was probably the LOCAL_EXPORT_C_INCLUDE_DIRS that made me miss this on the
original code review...
Change-Id: I55bc0b0698604338cd206bf5f336798929b6d8f9
system/core/include is included in the global include path using
-isystem, which hides all warnings. Fix warnings in cutils/atomic.h in
preparation for moving from -isystem to -I.
Test: m -j native
Bug: 31492149
Change-Id: I2a212f192309090a16d507e9ab6acf0fd7cac02d
We weren't detecting incorrect input before. Also clean up the help output
to match the style of all the toybox output. Also flush stdout so that we
don't report failure before even saying that we're going to try to contact
debuggerd...
Change-Id: I9e4bfa878f270fe46c3c210c7a7138959a108d67