Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
2fc6ffc4
Commit
2fc6ffc4
authored
5 years ago
by
Soby Mathew
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "libc: fix sparse warning for __assert()" into integration
parents
4210af0f
f906a44e
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/lib/libc/assert.h
+4
-4
include/lib/libc/assert.h
lib/libc/assert.c
+5
-4
lib/libc/assert.c
with
9 additions
and
8 deletions
+9
-8
include/lib/libc/assert.h
View file @
2fc6ffc4
/*
* 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
*/
...
...
@@ -30,12 +30,12 @@
#endif
/* ENABLE_ASSERTIONS */
#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
);
#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
__dead2
void
__assert
(
void
);
void
__dead2
__assert
(
void
);
#endif
#endif
/* ASSERT_H */
This diff is collapsed.
Click to expand it.
lib/libc/assert.c
View file @
2fc6ffc4
/*
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -18,7 +18,8 @@
*/
#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
);
backtrace
(
"assert"
);
...
...
@@ -26,7 +27,7 @@ void __assert(const char *file, unsigned int line, const char *assertion)
plat_panic_handler
();
}
#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
);
backtrace
(
"assert"
);
...
...
@@ -34,7 +35,7 @@ void __assert(const char *file, unsigned int line)
plat_panic_handler
();
}
#else
void
__assert
(
void
)
void
__dead2
__assert
(
void
)
{
backtrace
(
"assert"
);
(
void
)
console_flush
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help