Skip to content

Conversation

@asklar
Copy link
Member

@asklar asklar commented Jan 26, 2021

Removes some "disable warnings" that are not needed. These warnings are required per SDL.

  • C4018 - 'expression' : signed/unsigned mismatch
  • C4146 - unary minus operator applied to unsigned type, result still unsigned
  • C4995 - 'function': name was marked as #pragma deprecated
Microsoft Reviewers: Open in CodeFlow

@asklar asklar changed the title [WIP] Sdl Restore some SDL warnings (first pass) Jan 27, 2021
@asklar asklar marked this pull request as ready for review January 27, 2021 03:39
@asklar asklar requested a review from a team as a code owner January 27, 2021 03:39
@asklar asklar added the AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) label Jan 27, 2021
@ghost
Copy link

ghost commented Jan 27, 2021

Hello @asklar!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@rectified95
Copy link
Contributor

rectified95 commented Jan 28, 2021

Will these warnings show up now (or not since they're 'not needed')? If so should we create tasks to fix them?

@asklar
Copy link
Member Author

asklar commented Jan 28, 2021

Will these warnings show up now (or not since they're 'not needed')? If so should we create tasks to fix them?

@rectified95 no, these are warnings that were disabled but we don't have any code that triggers them now, maybe we used to :)

@NickGerleman
Copy link
Contributor

Just to be sure, do we know if the warnings are currently enabled in this repo? Some of the code has history in other repos, which might have slightly different configuration for detecting anything opt-in.

@asklar
Copy link
Member Author

asklar commented Jan 28, 2021

Just to be sure, do we know if the warnings are currently enabled in this repo? Some of the code has history in other repos, which might have slightly different configuration for detecting anything opt-in.

Warnings are enabled, and we have 267 of them right now. It's just that these ones I'm removing aren't being triggered.
image

@NickGerleman
Copy link
Contributor

I think some of these may be off by default, even at /W4.

Would be great to do a sanity check. Like, seeing if it's picked up with /Wall, or creating some code that what violate the error and see if it's caught.

I think some different projects may also have different settings for warnings as errors. I remember some work in that area last year but don't remember outcomes.

@NickGerleman
Copy link
Contributor

Looks like these don't show up in the off by default list. Signing off.

@ghost ghost merged commit a5270d6 into microsoft:master Jan 28, 2021
@asklar asklar deleted the sdl branch January 28, 2021 08:22
@asklar asklar linked an issue Jan 28, 2021 that may be closed by this pull request
@aschultz
Copy link
Contributor

aschultz commented Feb 3, 2021

@asklar @NickGerleman Any chance we can get this backported to 0.63/0.64?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDL compliance

4 participants