Skip to content

Commit

Permalink
Fix two MSVC warnings (#160)
Browse files Browse the repository at this point in the history
* Fix MSVC unknown pragma warning

* Fix MSVC implicit conversion warning

* Update stream_info_impl.cpp
  • Loading branch information
chausner authored Feb 19, 2022
1 parent 7d0cc6b commit dbbe715
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/stream_info_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ uint32_t lsl::stream_info_impl::calc_transport_buf_samples(
else if (nominal_srate() == LSL_IRREGULAR_RATE)
buf_samples = requested_len * 100;
else
buf_samples = nominal_srate() * requested_len;
buf_samples = static_cast<int32_t>(nominal_srate() * requested_len);
if (flags & transp_bufsize_thousandths) buf_samples /= 1000;
buf_samples = (buf_samples > 0) ? buf_samples : 1;
return buf_samples;
Expand Down
3 changes: 2 additions & 1 deletion src/time_postprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#include <limits>
#include <utility>

#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wdouble-promotion"
#ifdef __clang__
#elif defined(__clang__)
#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion"
#endif

Expand Down

0 comments on commit dbbe715

Please sign in to comment.