Silence CodeQL false positive warnings #4942
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
// lgtm [cpp/unclear-array-index-validation]__msvc_string_view.hpp668: We havebool _Matches[256]and the index is cast tounsigned char.__msvc_string_view.hpp1334:basic_string_view::operator[]has optional validation controlled by_CONTAINER_DEBUG_LEVELand intentionally doesn't validate by default.charconv:_Digit_from_bytehas 256 elements (enforced by_STL_INTERNAL_STATIC_ASSERT) and the index is cast tounsigned char.char*towchar_t*" silenced by// lgtm [cpp/incorrect-string-type-conversion]xutility:_Copy_memmove()is correctly bypassing pointer arithmetic for performance.StlLCMapStringA.cpp: This function hasLCMapStringA's narrow interface, but implementsLCMAP_SORTKEYwith wideLCMapStringEx. "The sort key is stored in the buffer and treated as an opaque array of bytes" so there is no correctness issue.