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

Run static code analysis on IIS #58167

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

BrennanConroy
Copy link
Member

@BrennanConroy BrennanConroy commented Sep 30, 2024

Fix our C++ projects to actually run static analysis.

Turns out we have >2000 errors but I didn't realize that before I started randomly updating bits of the code in reaction to some of the errors. So there is a random assortment of fixes before I ended up disabling a bunch of the rules.

We will work on enabling more rules in future PRs.

@BrennanConroy BrennanConroy added feature-iis Includes: IIS, ANCM area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions labels Sep 30, 2024
@@ -268,56 +268,55 @@ Hash(
const GUID* pguid,
DWORD dwHash = 0)
{

return * reinterpret_cast<const DWORD *>(const_cast<GUID*>(pguid)) + dwHash;
return pguid->Data1 + dwHash;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to call this one out since it's hidden amongst all the other changes.

typedef struct _GUID {
    unsigned long  Data1;
    unsigned short Data2;
    unsigned short Data3;
    unsigned char  Data4[ 8 ];
} GUID;

@@ -576,7 +576,7 @@ REQUEST_NOTIFICATION_STATUS
strDescription.QueryStr(),
strDescription.QuerySizeCCH());
}
(VOID)strDescription.SyncWithBuffer();
std::ignore = strDescription.SyncWithBuffer();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this

@BrennanConroy BrennanConroy marked this pull request as ready for review October 1, 2024 22:02
Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, but I am very much not an expert.

Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-iis Includes: IIS, ANCM pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants