| #
b9526392 |
| 13-Sep-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: add runtime_assert()
Adds runtime_assert() as a version of assert() that can be used instead of assert() when evaluating constant expressions to avoid the warning: error: function might be
libutils: add runtime_assert()
Adds runtime_assert() as a version of assert() that can be used instead of assert() when evaluating constant expressions to avoid the warning: error: function might be candidate for attribute ‘noreturn’
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Leisen <leisen1@huawei.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
84983a85 |
| 09-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: change assert() to conform with stdlib implementation
Changes assert() definition to return a (dummy) value when expression to true. This change allows to integrate external libraries whic
libutils: change assert() to conform with stdlib implementation
Changes assert() definition to return a (dummy) value when expression to true. This change allows to integrate external libraries which assume assert() conforms to such implementation, as found in GCC or LLVM toolchains.
Removes inline description comment that could be confusing.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
7eaed3a3 |
| 23-Nov-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: prefix system header guard with 2 underscore chars
Adds prefix "__" to standard header files implemented in libutils. This is applicable as these header guards macro are system macros. Thi
libutils: prefix system header guard with 2 underscore chars
Adds prefix "__" to standard header files implemented in libutils. This is applicable as these header guards macro are system macros. This change prevents conflicts with external component as faced with SCP-firmware [1] that implements wrapper headers with #include_next for assert.h and stdlib.h using ASSERT_H [2] and STDLIB_H [3] as header guards as in libutils.
Prior this change did stdint.h both define STDINT_H and _STDINT_H but guards only upon STDINT_H. This change removes STDINT_H.
Link: [1] https://github.com/ARM-software/SCP-firmware.git Link: [2] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/assert.h#L8-L9 Link: [3] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/stdlib.h#L8-L9 Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
49cfa41e |
| 08-Sep-2022 |
Gavin <zheting0815@gmail.com> |
libutils:assert.h:add compiler check for static_assert
static_assert is belong to reserved word since C++11. We only need this definition when not using C++ or the C++ version less than C++11.
Sign
libutils:assert.h:add compiler check for static_assert
static_assert is belong to reserved word since C++11. We only need this definition when not using C++ or the C++ version less than C++11.
Signed-off-by: Gavin Liu <Gavin.Liu@mediatek.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
4516e38d |
| 14-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
assert.h: add static_assert
Adds the static_assert macro from C11.
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens W
assert.h: add static_assert
Adds the static_assert macro from C11.
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
dc0f4ec2 |
| 16-May-2018 |
Etienne Carriere <etienne.carriere@st.com> |
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are owned by either only STMicroelectronics or only both Linaro and STMicroelectronics.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
1bb92983 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] wa
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] was used to double check the license matching code in the Python script. All the licenses detected by scancode are either detected by spdxify.py, or have no SPDX identifier, or are false matches.
Link: [1] https://spdx.org/licenses/ Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Link: [3] https://github.com/nexB/scancode-toolkit Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
a3c08883 |
| 24-May-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Sparse fix: _assert_break()
Moves the __noreturn attribute for declaration of _assert_break() to before the function name instead which enables sparse to recognize the attribute properly.
Reviewed-
Sparse fix: _assert_break()
Moves the __noreturn attribute for declaration of _assert_break() to before the function name instead which enables sparse to recognize the attribute properly.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
8c9d9445 |
| 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __asse
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __assert_log() uses EMSG_RAW() to no pollute trace with __assert_log() internals (duplicated file/line/func traces).
Change assert() to use a low/high verbosity mode upon CFG_TEE_CORE_DEBUG as panic() does.
Change assert() to also trace the C function where assertion failed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| #
a8f34e0c |
| 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
assert: honor NDEBUG
Macro assert() expands to a no-op when NDEBUG is defined.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> R
assert: honor NDEBUG
Macro assert() expands to a no-op when NDEBUG is defined.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| #
4e77495e |
| 03-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Rename and move TEE_COMPILE_TIME_ASSERT
Renames TEE_COMPILE_TIME_ASSERT to COMPILE_TIME_ASSERT, the macro is also moved to assert.h to be available anywhere.
Signed-off-by: Jens Wiklander <jens.wik
Rename and move TEE_COMPILE_TIME_ASSERT
Renames TEE_COMPILE_TIME_ASSERT to COMPILE_TIME_ASSERT, the macro is also moved to assert.h to be available anywhere.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| #
cebdec51 |
| 18-Sep-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Reenable warnings for all non-3rd party code
* Reenables warnings for all non-3rd party code * Renames dprintf macro to dprintf_level
|
| #
b0104773 |
| 12-Jun-2014 |
Pascal Brand <pascal.brand@st.com> |
Open-source the TEE Core
Signed-off-by: Pascal Brand <pascal.brand@st.com>
|