Use __func__ instead of __FUNCTION__
The __FUNCTION__ is not part of the C99/C++11 standard. So replace all occurrences with the standard __func__. Side note: GCC 5.1 warns when using -Wpedantic -std=c99 and __FUNCTION__. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
@@ -39,11 +39,11 @@ libc_fatal (const char *msg,
|
||||
|
||||
#ifndef LIBC_NDEBUG
|
||||
# define LIBC_ASSERT(x) do { if (__builtin_expect (!(x), 0)) { \
|
||||
libc_fatal (#x, __FILE__, __FUNCTION__, __LINE__); } } while (0)
|
||||
libc_fatal (#x, __FILE__, __func__, __LINE__); } } while (0)
|
||||
# define LIBC_UNREACHABLE() \
|
||||
do \
|
||||
{ \
|
||||
libc_fatal ("Code is unreachable", __FILE__, __FUNCTION__, __LINE__); \
|
||||
libc_fatal ("Code is unreachable", __FILE__, __func__, __LINE__); \
|
||||
} while (0)
|
||||
#else /* !LIBC_NDEBUG */
|
||||
# define LIBC_ASSERT(x) do { if (false) { (void) (x); } } while (0)
|
||||
|
||||
@@ -48,7 +48,7 @@ LIBC_UNREACHABLE_STUB_FOR (int raise (int sig_no __attr_unused___))
|
||||
#define LIBC_EXIT_ON_ERROR(syscall_ret_val) \
|
||||
if ((syscall_ret_val) < 0) \
|
||||
{ \
|
||||
libc_fatal ("Syscall", __FILE__, __FUNCTION__, __LINE__); \
|
||||
libc_fatal ("Syscall", __FILE__, __func__, __LINE__); \
|
||||
}
|
||||
|
||||
static long int syscall_0 (long int syscall_no);
|
||||
|
||||
Reference in New Issue
Block a user