diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-08-13 15:18:34 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-08-16 11:29:49 -0700 |
commit | bbb869ca80fa299f7888b35134218229521dd0c0 (patch) | |
tree | 75ea1a02c7974bb1688de8d4655cc2e3a9005ff2 /host/lib/usrp/usrp1 | |
parent | 0280a82aa00f340bf7de11f97fafc11424ba4f1e (diff) | |
download | uhd-bbb869ca80fa299f7888b35134218229521dd0c0.tar.gz uhd-bbb869ca80fa299f7888b35134218229521dd0c0.tar.bz2 uhd-bbb869ca80fa299f7888b35134218229521dd0c0.zip |
uhd: Add UHD_FALLTHROUGH attribute
This provides a platform-independent attribute to allow fallthroughs in
switch statements. Example:
switch (foo) {
case BAR:
do_something();
UHD_FALLTHROUGH
case BAZ:
do_another_thing();
}
The usage of UHD_FALLTHROUGH will avoid a compiler warning if indeed the
fallthrough was intentional. The associated warning
(-Wimplicit-fallthrough) is only available on gcc and Clang.
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r-- | host/lib/usrp/usrp1/soft_time_ctrl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |