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

Suppress warnings introduced with Visual Studio 2022 17.8.0 Preview 3.0 #283

Merged
merged 1 commit into from
Oct 14, 2023
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
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@
C5246 = the initialization of a subobject should be wrapped in braces [prevents simple usage of std::byte]
C5264 = 'const' variable is not used [reported for const in header files]
C5258 = explicit capture of '' is not required for this use [VS 2019 requires capture of constexpr]
C6393 = A lookup table of size 365 is not sufficient to handle leap years [CharLS doesn't handle leap years]
-->
<DisableSpecificWarnings Condition="'$(CHARLS_ALL_WARNINGS)'!=''">4061;4365;4464;4514;4571;4623;4625;4626;4710;4711;4738;4820;5026;5027;5045;5246;5264;5258</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(CHARLS_ALL_WARNINGS)'!=''">4061;4365;4464;4514;4571;4623;4625;4626;4710;4711;4738;4820;5026;5027;5045;5246;5264;5258;6393</DisableSpecificWarnings>

<!--
__cplusplus = Use the correct value for the __cplusplus macro
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ jobs:
CXX: g++-12
Shared: 'ON'

Clang-12 Debug:
Clang-13 Debug:
buildType: Debug
CC: clang-12
CXX: clang++-12
CC: clang-13
CXX: clang++-13
Shared: 'OFF'

Clang-13 Release:
Expand Down
2 changes: 1 addition & 1 deletion default.ruleset.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ C26472: Don't use static_cast for arithmetic conversions
-> Rationale: can only be solved with gsl::narrow_cast

C26478: Don't use std::move on constant variables. (es.56).
-> Rationale: false warnings [Visual Studio 2022 17.7.0]
-> Rationale: false warnings [Visual Studio 2022 17.7.0, note: fixed in 17.8.0]

C26481: Do not pass an array as a single pointer.
-> Rationale: gsl::span is not available.
Expand Down
4 changes: 2 additions & 2 deletions src/jpeg_stream_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void jpeg_stream_reader::read_next_start_of_scan()
ASSERT(state_ == state::bit_stream_section);
state_ = state::scan_section;

do
do // NOLINT(cppcoreguidelines-avoid-do-while): the loop must be executed at least once.
{
const jpeg_marker_code marker_code{read_next_marker_code()};
validate_marker_code(marker_code);
Expand All @@ -129,7 +129,7 @@ jpeg_marker_code jpeg_stream_reader::read_next_marker_code()
throw_jpegls_error(jpegls_errc::jpeg_marker_start_byte_not_found);

// Read all preceding 0xFF fill values until a non 0xFF value has been found. (see ISO/IEC 10918-1, B.1.1.2)
do
do // NOLINT(cppcoreguidelines-avoid-do-while): the loop must be executed at least once.
{
value = read_byte_checked();
} while (value == jpeg_marker_start_byte);
Expand Down
Loading