Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KED ARM trusted-firmware Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KED Software Projects
Miscellaneous
KED ARM trusted-firmware Fork
Commits
2fc6ffc4
Commit
2fc6ffc4
authored
5 years ago
by
Soby Mathew
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "libc: fix sparse warning for __assert()" into integration
parents
4210af0f
f906a44e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
4 additions, 4 deletions
include/lib/libc/assert.h
lib/libc/assert.c
+5
-4
5 additions, 4 deletions
lib/libc/assert.c
with
9 additions
and
8 deletions
include/lib/libc/assert.h
+
4
−
4
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
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -30,12 +30,12 @@
...
@@ -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 */
This diff is collapsed.
Click to expand it.
lib/libc/assert.c
+
5
−
4
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
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -18,7 +18,8 @@
...
@@ -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)
...
@@ -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)
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment