platform_system_core/base
Spencer Low 6001c87cbc adb: win32: fix StringPrintf format string checking of %zd and PRIu64
At runtime, vsnprintf (and android::base::StringPrintf which calls it)
call a mingw version of vsnprintf, not the vsnprintf from MSVCRT.DLL.
The mingw version properly understands %zd and PRIu64 (the latter,
provided that you #include <inttypes.h>).

The problem was that android::base::StringPrintf was causing
compile-time errors saying that %zd and PRIu64 were not recognized. It
seems that this was because the attribute on the function prototypes
specified `printf' instead of `gnu_printf'. Once that was fixed to match
vsnprintf's attribute, the warnings went away.

This uses similar preprocessor techniques as <android/log.h>.

Also restore a %zd usage to avoid a static_cast<>, and make
print_transfer_progress()'s format string compile-time checkable (and
tweak some types and %llu => PRIu64).

Change-Id: I80b31b9994858a28cb7c6847143b86108b8ab842
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-05-13 19:30:30 -07:00
..
include/base adb: win32: fix StringPrintf format string checking of %zd and PRIu64 2015-05-13 19:30:30 -07:00
.clang-format Revert "Revert "Create libbase."" 2015-03-16 10:08:46 -07:00
Android.mk Support base::logging on Windows. 2015-04-29 18:01:53 -07:00
CPPLINT.cfg Don't show lint errors for rvalue references. 2015-04-02 18:38:01 -07:00
file.cpp Add ReadFully and WriteFully to libbase. 2015-04-24 21:57:16 -07:00
file_test.cpp Fix comparison between signed and unsigned error on darwin 2015-04-30 16:58:26 -07:00
logging.cpp Add additional shielding against the ERROR macro. 2015-05-04 16:40:38 -07:00
logging_test.cpp Support base::logging on Windows. 2015-04-29 18:01:53 -07:00
stringprintf.cpp Revert "Revert "Create libbase."" 2015-03-16 10:08:46 -07:00
stringprintf_test.cpp Get libbase tests working on Windows. 2015-04-29 17:11:28 -07:00
strings.cpp Remove strtok from adb. 2015-04-27 19:42:20 -07:00
strings_test.cpp Remove strtok from adb. 2015-04-27 19:42:20 -07:00
test_main.cpp Support base::logging on Windows. 2015-04-29 18:01:53 -07:00
test_utils.cpp Get libbase tests working on Windows. 2015-04-29 17:11:28 -07:00
test_utils.h Add google3 style logging to libbase. 2015-03-20 14:04:35 -07:00