Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[maint] Moved declaration of SRT_ATR_ALIGNAS to fix a warning #2866

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading