-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: use SAL2 _In_, _Out_ to prevent conflicts
#7042
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
Conversation
8507342 to
c9bb915
Compare
|
Good to see this clean up. I don't like all the warning removals the project already has rather than increasing them can we change the code? |
|
@rhuanjl Sure. The compiler now enforces an explicit |
c9bb915 to
afa9683
Compare
azure-pipelines.yml
Outdated
| libtype_flag: '' | ||
| Ubuntu20.ReleaseWithDebug: | ||
| image_name: 'ubuntu-20.04' | ||
| Ubuntu24.ReleaseWithDebug: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 4 Linux tests above were meant to be latest ubuntu then these two below were meant to be an older version for slightly broader coverage.
To keep the pattern should put the top 4 to Ubuntu24 and change these two to Ubuntu 22.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
Done in 88fc061 (I removed the old commit through rebase)
|
Happy with everything other than the CI change (see comment above). |
first argument in call to 'memset' is a pointer to non-trivially copyable type [-Wnontrivial-memcall]
afa9683 to
88fc061
Compare
CC uses the Microsoft source-code annotation language (SAL) to enable static analysis of pointer usage etc.
The CC code-base still uses the old annotations (e.g.
__ininstead of_In_).Some of the old SAL annotation (i.e.
__in) stand in conflict with the stdlib.Here's an inofficial guide: https://samscode.blogspot.com/2015/02/sal-to-sal2-porting-guide.html
Changes
\b__in\bwith_In_and\b__out\bwith_Out_Use SAL2 _In_, _Out_ to prevent conflicts. dotnet/runtime#63261
(Should this be a separate PR?)
-Wnontrivial-memcallto allowmemsetwith non-void*@rhuanjl