libc: Introduce __errordecl()
Define __errordecl and replace __attribute__((__error__("foo"))) with __errordecl. Make sure __errordecl is a no-op on clang, as it generates a compile time warning. Change-Id: Ifa1a2d3afd6881de9d479fc2adac6737871a2949
This commit is contained in:
@@ -486,10 +486,8 @@ int sprintf(char *dest, const char *format, ...)
|
||||
|
||||
extern char *__fgets_real(char *, int, FILE *)
|
||||
__asm__(__USER_LABEL_PREFIX__ "fgets");
|
||||
extern void __fgets_too_big_error()
|
||||
__attribute__((__error__("fgets called with size bigger than buffer")));
|
||||
extern void __fgets_too_small_error()
|
||||
__attribute__((__error__("fgets called with size less than zero")));
|
||||
__errordecl(__fgets_too_big_error, "fgets called with size bigger than buffer");
|
||||
__errordecl(__fgets_too_small_error, "fgets called with size less than zero");
|
||||
extern char *__fgets_chk(char *, int, FILE *, size_t);
|
||||
|
||||
__BIONIC_FORTIFY_INLINE
|
||||
|
Reference in New Issue
Block a user