fix: use SAL2 _In_, _Out_ to prevent conflicts#7042
fix: use SAL2 _In_, _Out_ to prevent conflicts#7042rhuanjl merged 8 commits intochakra-core:masterfrom
_In_, _Out_ to prevent conflicts#7042Conversation
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
| libtype_flag: '' | ||
| Ubuntu20.ReleaseWithDebug: | ||
| image_name: 'ubuntu-20.04' | ||
| Ubuntu24.ReleaseWithDebug: |
There was a problem hiding this comment.
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.
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