mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00
Merge "libc: fix sparse warning for __assert()" into integration
This commit is contained in:
commit
2fc6ffc451
2 changed files with 9 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -30,12 +30,12 @@
|
||||||
#endif /* ENABLE_ASSERTIONS */
|
#endif /* ENABLE_ASSERTIONS */
|
||||||
|
|
||||||
#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
|
#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
|
||||||
__dead2 void __assert(const char *file, unsigned int line,
|
void __dead2 __assert(const char *file, unsigned int line,
|
||||||
const char *assertion);
|
const char *assertion);
|
||||||
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
|
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
|
||||||
__dead2 void __assert(const char *file, unsigned int line);
|
void __dead2 __assert(const char *file, unsigned int line);
|
||||||
#else
|
#else
|
||||||
__dead2 void __assert(void);
|
void __dead2 __assert(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* ASSERT_H */
|
#endif /* ASSERT_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
|
#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
|
||||||
void __assert(const char *file, unsigned int line, const char *assertion)
|
void __dead2 __assert(const char *file, unsigned int line,
|
||||||
|
const char *assertion)
|
||||||
{
|
{
|
||||||
printf("ASSERT: %s:%d:%s\n", file, line, assertion);
|
printf("ASSERT: %s:%d:%s\n", file, line, assertion);
|
||||||
backtrace("assert");
|
backtrace("assert");
|
||||||
|
@ -26,7 +27,7 @@ void __assert(const char *file, unsigned int line, const char *assertion)
|
||||||
plat_panic_handler();
|
plat_panic_handler();
|
||||||
}
|
}
|
||||||
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
|
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
|
||||||
void __assert(const char *file, unsigned int line)
|
void __dead2 __assert(const char *file, unsigned int line)
|
||||||
{
|
{
|
||||||
printf("ASSERT: %s:%d\n", file, line);
|
printf("ASSERT: %s:%d\n", file, line);
|
||||||
backtrace("assert");
|
backtrace("assert");
|
||||||
|
@ -34,7 +35,7 @@ void __assert(const char *file, unsigned int line)
|
||||||
plat_panic_handler();
|
plat_panic_handler();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __assert(void)
|
void __dead2 __assert(void)
|
||||||
{
|
{
|
||||||
backtrace("assert");
|
backtrace("assert");
|
||||||
(void)console_flush();
|
(void)console_flush();
|
||||||
|
|
Loading…
Add table
Reference in a new issue