summaryrefslogtreecommitdiff
path: root/ltp_framework/include/compiler.h
blob: ec714fe80cad0d5a890b057518e2c2bb0276c03a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * compiler.h: take care of fun compiler details here
 *
 * Licensed under the GPL-2 or later
 */

#ifndef __LTP_COMPILER_H__
#define __LTP_COMPILER_H__

#define LTP_ATTRIBUTE_NORETURN		__attribute__((noreturn))
#define LTP_ATTRIBUTE_UNUSED		__attribute__((unused))
#define LTP_ATTRIBUTE_UNUSED_RESULT	__attribute__((warn_unused_result))

#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#endif

#endif /* __LTP_COMPILER_H__ */