mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 03:24:25 +00:00

The codebase was using non-standard headers. It is needed to replace them by the correct ones so that we can use the new libc headers. Change-Id: I530f71d9510cb036e69fe79823c8230afe890b9d Acked-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
23 lines
806 B
C
23 lines
806 B
C
/*
|
|
* Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef __CASSERT_H__
|
|
#define __CASSERT_H__
|
|
|
|
#include <cdefs.h>
|
|
|
|
/*******************************************************************************
|
|
* Macro to flag a compile time assertion. It uses the preprocessor to generate
|
|
* an invalid C construct if 'cond' evaluates to false.
|
|
* The following compilation error is triggered if the assertion fails:
|
|
* "error: size of array 'msg' is negative"
|
|
* The 'unused' attribute ensures that the unused typedef does not emit a
|
|
* compiler warning.
|
|
******************************************************************************/
|
|
#define CASSERT(cond, msg) \
|
|
typedef char msg[(cond) ? 1 : -1] __unused
|
|
|
|
#endif /* __CASSERT_H__ */
|