diff --git a/Directory.Build.props b/Directory.Build.props
index 85c6b8a4..2b99a3c2 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -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]
-->
- 4061;4365;4464;4514;4571;4623;4625;4626;4710;4711;4738;4820;5026;5027;5045;5246;5264;5258
+ 4061;4365;4464;4514;4571;4623;4625;4626;4710;4711;4738;4820;5026;5027;5045;5246;5264;5258;6393
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.
diff --git a/src/jpeg_stream_reader.cpp b/src/jpeg_stream_reader.cpp
index 20d29363..ca2694e4 100644
--- a/src/jpeg_stream_reader.cpp
+++ b/src/jpeg_stream_reader.cpp
@@ -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);
@@ -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);