Skip to content

Commit

Permalink
Fixed Windows warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lelegard committed Oct 29, 2022
1 parent 0ddb314 commit 2e9b45c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libtsduck/base/types/tsUString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,7 @@ ts::UString ts::UString::Float(double value, size_type width, size_type precisio
TS_PUSH_WARNING()
TS_GCC_NOWARNING(format-nonliteral)
TS_LLVM_NOWARNING(format-nonliteral)
TS_MSC_NOWARNING(4774) // 'snprintf' : format string expected in argument 3 is not a string literal
std::snprintf(&str[0], str.size(), format.c_str(), int(width), int(precision), value);
TS_POP_WARNING()

Expand Down
2 changes: 1 addition & 1 deletion src/libtsduck/tsVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
//!
//! TSDuck commit number (automatically updated by Git hooks).
//!
#define TS_COMMIT 2982
#define TS_COMMIT 2983
2 changes: 2 additions & 0 deletions src/utest/utestBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

// Some floating-point literal (implicitly double) are used as ieee_float32_t
TS_LLVM_NOWARNING(implicit-float-conversion)
TS_MSC_NOWARNING(4056) // overflow in floating-point constant arithmetic
TS_MSC_NOWARNING(4305) // truncation from 'double' to 'ts::ieee_float32_t'


//----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions src/utest/utestFloatUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

// Many floating-point literal (implicitly double) are used as ieee_float32_t
TS_LLVM_NOWARNING(implicit-float-conversion)
TS_MSC_NOWARNING(4056) // overflow in floating-point constant arithmetic
TS_MSC_NOWARNING(4305) // truncation from 'double' to 'ts::ieee_float32_t'


//----------------------------------------------------------------------------
Expand Down

0 comments on commit 2e9b45c

Please sign in to comment.