Skip to content

Commit

Permalink
[core] Moved declaration of SRT_ATR_ALIGNAS to fix a warning (#2866).
Browse files Browse the repository at this point in the history
  • Loading branch information
yomnes0 committed Feb 2, 2024
1 parent 3dba3f4 commit 4c443d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 0 additions & 7 deletions srtcore/channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions srtcore/srt_attr_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4c443d6

Please sign in to comment.