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

C26493 analyzer warnings in result_macros.h #389

Open
avivanoff opened this issue Nov 9, 2023 · 1 comment
Open

C26493 analyzer warnings in result_macros.h #389

avivanoff opened this issue Nov 9, 2023 · 1 comment
Labels
code-analysis Bugs that are reported by code analysis tools, but not the compiler

Comments

@avivanoff
Copy link

When building with code analysis on, at least the following lines result in C26493:

status = ((NTSTATUS)(hr) <= 0 ? ((NTSTATUS)(hr)) : ((NTSTATUS)(((hr) & 0x0000FFFF) | (FACILITY_SSPI << 16) | ERROR_SEVERITY_ERROR)));

if ((iRet < 0) || (((size_t)iRet) > cchMax))

else if (((size_t)iRet) == cchMax)

cchNewDestLength = (size_t)iRet;

@ChrisGuzak
Copy link
Member

good catch. feel free to post a PR.

@dunhor dunhor added the code-analysis Bugs that are reported by code analysis tools, but not the compiler label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-analysis Bugs that are reported by code analysis tools, but not the compiler
Projects
None yet
Development

No branches or pull requests

3 participants