From 8390795d5b0dd5e5d18fce96077512a1d6e7f192 Mon Sep 17 00:00:00 2001 From: yomnes0 Date: Fri, 2 Feb 2024 09:53:00 +0100 Subject: [PATCH] [maint] #2865 Moved declaration of SRT_ATR_ALIGNAS to fix a warning --- srtcore/channel.h | 7 ------- srtcore/srt_attr_defs.h | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/srtcore/channel.h b/srtcore/channel.h index 6df7ec0ce..e09b13fd9 100644 --- a/srtcore/channel.h +++ b/srtcore/channel.h @@ -49,13 +49,6 @@ written by modified by Haivision Systems Inc. *****************************************************************************/ -#if HAVE_CXX11 -#define SRT_ATR_ALIGNAS(n) alignas(n) -#elif HAVE_GCC -#define SRT_ATR_ALIGNAS(n) __attribute__((aligned(n))) -#else -#define SRT_ATR_ALIGNAS(n) -#endif #ifndef INC_SRT_CHANNEL_H #define INC_SRT_CHANNEL_H diff --git a/srtcore/srt_attr_defs.h b/srtcore/srt_attr_defs.h index 84daabeb1..85ea9f96d 100644 --- a/srtcore/srt_attr_defs.h +++ b/srtcore/srt_attr_defs.h @@ -31,6 +31,14 @@ used by SRT library internally. #define ATR_DEPRECATED #endif +#if HAVE_CXX11 +#define SRT_ATR_ALIGNAS(n) alignas(n) +#elif HAVE_GCC +#define SRT_ATR_ALIGNAS(n) __attribute__((aligned(n))) +#else +#define SRT_ATR_ALIGNAS(n) +#endif + #if defined(__cplusplus) && __cplusplus > 199711L #define HAVE_CXX11 1 // For gcc 4.7, claim C++11 is supported, as long as experimental C++0x is on,