mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-01 05:03:55 +00:00
In the hypervisor, some strings are assigned to non const object, this violates MISRA C:2012. Update the type of the object as const type since it always points to string. Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
23 lines
422 B
C
23 lines
422 B
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef ASSERT_H
|
|
#define ASSERT_H
|
|
|
|
#ifdef HV_DEBUG
|
|
void __assert(uint32_t line, const char *file, const char *txt);
|
|
|
|
#define ASSERT(x, ...) \
|
|
if (!(x)) {\
|
|
pr_fatal(__VA_ARGS__);\
|
|
__assert(__LINE__, __FILE__, "fatal error");\
|
|
}
|
|
#else
|
|
#define ASSERT(x, ...) do { } while(0)
|
|
#endif
|
|
|
|
#endif /* ASSERT_H */
|