diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/include/uhd/config.hpp | 13 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/soft_time_ctrl.cpp | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index dee0716f4..383159005 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -53,6 +53,7 @@ typedef ptrdiff_t ssize_t; # define UHD_DEPRECATED __declspec(deprecated) # define UHD_ALIGNED(x) __declspec(align(x)) # define UHD_UNUSED(x) x +# define UHD_FALLTHROUGH #elif defined(__MINGW32__) # define UHD_EXPORT __declspec(dllexport) # define UHD_IMPORT __declspec(dllimport) @@ -61,6 +62,7 @@ typedef ptrdiff_t ssize_t; # define UHD_DEPRECATED __declspec(deprecated) # define UHD_ALIGNED(x) __declspec(align(x)) # define UHD_UNUSED(x) x __attribute__((unused)) +# define UHD_FALLTHROUGH #elif defined(__GNUG__) && __GNUG__ >= 4 # define UHD_EXPORT __attribute__((visibility("default"))) # define UHD_IMPORT __attribute__((visibility("default"))) @@ -69,6 +71,11 @@ typedef ptrdiff_t ssize_t; # define UHD_DEPRECATED __attribute__((deprecated)) # define UHD_ALIGNED(x) __attribute__((aligned(x))) # define UHD_UNUSED(x) x __attribute__((unused)) +# if __GNUG__ >= 7 +# define UHD_FALLTHROUGH __attribute__((fallthrough)); +# else +# define UHD_FALLTHROUGH +# endif #elif defined(__clang__) # define UHD_EXPORT __attribute__((visibility("default"))) # define UHD_IMPORT __attribute__((visibility("default"))) @@ -77,6 +84,11 @@ typedef ptrdiff_t ssize_t; # define UHD_DEPRECATED __attribute__((deprecated)) # define UHD_ALIGNED(x) __attribute__((aligned(x))) # define UHD_UNUSED(x) x __attribute__((unused)) +# if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 8) +# define UHD_FALLTHROUGH [[clang:fallthrough]] +# else +# define UHD_FALLTHROUGH +# endif #else # define UHD_EXPORT # define UHD_IMPORT @@ -85,6 +97,7 @@ typedef ptrdiff_t ssize_t; # define UHD_DEPRECATED # define UHD_ALIGNED(x) # define UHD_UNUSED(x) x +# define UHD_FALLTHROUGH #endif // Define API declaration macro diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp index 851f0f507..7f39caf8a 100644 --- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp +++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp @@ -102,6 +102,7 @@ public: metadata.error_code = rx_metadata_t::ERROR_CODE_BROKEN_CHAIN; _inline_msg_queue.push_with_pop_on_full(metadata); } //continue to next case... + UHD_FALLTHROUGH case stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE: md.end_of_burst = true; this->issue_stream_cmd(stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); |