android_bionic/libc
Xia Yang 6b45d57739 use GNU C89 extern inline semantics for __size_mul_overflow()
__size_mul_overflow generates warning under following compilation envrionment:

-OX -D_FORTIFY_SOURCE=2 (X=1, 2, 3)

For example:

echo '#include <stdio.h>' | \
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc \
    -I bionic/libc/arch-arm/include \
    -I bionic/libc/include \
    -I bionic/libc/kernel/uapi \
    -I bionic/libc/kernel/common \
    -I bionic/libc/kernel/uapi/asm-arm \
    -I bionic/libm/include \
    -I bionic/libm/include/arm \
    -I bionic/libc/include \
    -Werror \
    -O1 \
    -D_FORTIFY_SOURCE=2 \
    -c \
    -x c \
    -

bionic/libc/include/stdio.h:360:13: error: '__size_mul_overflow' is
static but used in inline function 'fread' which is not static [-Werror]
         if (__size_mul_overflow(size, count, &total)) {
                          ^

C99 - 6.7.4
"An inline definition of a function with external linkage shall not contain
a definition of a modifiable object with static storage duration, and shall
not contain a reference to an identifier with internal linkage."

As standard does not require compiler to determine when it is safe to
reference an internal function in an external inline function, but instead
delegalizes such reference as a whole, gcc throws a warning for such code
under C99 compilation.  Warning produced by libc header is inhereted widely
and strips the option of using -Werror to track code sanity.

Replace static inline specifier with gnu89 extern inline. Latter "is used
only for inlining. In no case is the function compiled on its own", which
is slightly different from former semantically, but should produce the same
result here.

Change-Id: I6a3374498e5499d110e54468cf9d0d67d2debbe2
2016-02-02 17:28:16 -08:00
..
arch-arm Add adjtimex 2016-01-28 13:41:22 -08:00
arch-arm64 Add adjtimex 2016-01-28 13:41:22 -08:00
arch-common/bionic
arch-mips Add adjtimex 2016-01-28 13:41:22 -08:00
arch-mips64 Add adjtimex 2016-01-28 13:41:22 -08:00
arch-x86 Add adjtimex 2016-01-28 13:41:22 -08:00
arch-x86_64 Add adjtimex 2016-01-28 13:41:22 -08:00
bionic Remove unused file. 2016-01-27 10:58:36 -08:00
dns Sync with upstream OpenBSD. 2016-01-15 16:30:18 -08:00
include use GNU C89 extern inline semantics for __size_mul_overflow() 2016-02-02 17:28:16 -08:00
kernel <netinet/udp.h> should include <linux/udp.h>. 2015-09-22 12:34:13 -07:00
malloc_debug Remove the unused TrackHeader structure. 2016-02-02 13:22:40 -08:00
private Revert "Revert "Make sem_wait able to return errno EINTR for sdk > 23."" 2016-01-25 17:39:18 -08:00
stdio Fix a sign extension bug in stdio. 2016-01-26 18:25:52 -08:00
stdlib Revert "Revert "Remove __sinit and __sdidinit."" 2015-12-05 07:30:59 -08:00
tools Add more fortify symbols to the expected differences from glibc. 2016-01-15 19:54:31 -08:00
tzcode Remove mktime_tz. 2016-01-06 09:15:02 -08:00
upstream-freebsd Move several FreeBSD functions to OpenBSD. 2015-09-14 19:01:58 -07:00
upstream-netbsd resolve merge conflicts of d676080a37 to lmp-mr1-ub-dev. 2015-10-21 14:56:52 -07:00
upstream-openbsd Implement funopen64. 2016-01-26 14:45:13 -08:00
zoneinfo Update timezone data to 2015g 2015-10-14 08:54:17 +00:00
Android.bp Update Android.bp to match Android.mk 2016-01-20 12:01:19 -08:00
Android.mk Implement funopen64. 2016-01-26 14:45:13 -08:00
MODULE_LICENSE_BSD
NOTICE Regenerate NOTICE files. 2015-08-28 20:23:52 -07:00
SYSCALLS.TXT Add adjtimex 2016-01-28 13:41:22 -08:00
crt.mk Tell kati about generated dependencies around crt 2016-01-28 19:39:50 +09:00
libc.arm.brillo.map Hide '__isthreaded' for lp64 libc.so 2016-01-27 14:54:36 -08:00
libc.arm.map Hide '__isthreaded' for lp64 libc.so 2016-01-27 14:54:36 -08:00
libc.arm64.map Hide '__isthreaded' for lp64 libc.so 2016-01-27 14:54:36 -08:00
libc.map.txt Hide '__moddi3' symbol for x86 and mips 2016-01-27 15:12:19 -08:00
libc.mips.brillo.map Hide '__moddi3' symbol for x86 and mips 2016-01-27 15:12:19 -08:00
libc.mips.map Hide '__moddi3' symbol for x86 and mips 2016-01-27 15:12:19 -08:00
libc.mips64.map Hide '__isthreaded' for lp64 libc.so 2016-01-27 14:54:36 -08:00
libc.x86.brillo.map Hide '__moddi3' symbol for x86 and mips 2016-01-27 15:12:19 -08:00
libc.x86.map Hide '__moddi3' symbol for x86 and mips 2016-01-27 15:12:19 -08:00
libc.x86_64.map Hide '__isthreaded' for lp64 libc.so 2016-01-27 14:54:36 -08:00
version_script.txt