From e55d071e5485a937efd427d159b76c208cccdcce Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 24 Jul 2022 16:44:24 +0300 Subject: fixes #3118 (Update toxcore to 0.2.18) --- protocols/Tox/libtox/src/toxcore/attributes.h | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 protocols/Tox/libtox/src/toxcore/attributes.h (limited to 'protocols/Tox/libtox/src/toxcore/attributes.h') diff --git a/protocols/Tox/libtox/src/toxcore/attributes.h b/protocols/Tox/libtox/src/toxcore/attributes.h new file mode 100644 index 0000000000..3da768f2a3 --- /dev/null +++ b/protocols/Tox/libtox/src/toxcore/attributes.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Copyright © 2022 The TokTok team. + */ + +/** + * printf and nonnull attributes for GCC/Clang and Cimple. + */ +#ifndef C_TOXCORE_TOXCORE_ATTRIBUTES_H +#define C_TOXCORE_TOXCORE_ATTRIBUTES_H + +/* No declarations here. */ + +//!TOKSTYLE- + +#ifdef __GNUC__ +#define GNU_PRINTF(f, a) __attribute__((__format__(__printf__, f, a))) +#else +#define GNU_PRINTF(f, a) +#endif + +#if defined(__GNUC__) && defined(_DEBUG) && !defined(__OPTIMIZE__) +#define non_null(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else +#define non_null(...) +#endif + +#define nullable(...) + +//!TOKSTYLE+ + +#endif // C_TOXCORE_TOXCORE_ATTRIBUTES_H -- cgit v1.2.3