Skip to content

Enable -Wunused-variable warning. - #2513

Merged
ScottTodd merged 2 commits into
iree-org:mainfrom
ScottTodd:warning-unused-variable
Jul 14, 2020
Merged

ScottTodd merged 2 commits into
iree-org:mainfrom
ScottTodd:warning-unused-variable

Conversation

@ScottTodd

@ScottTodd ScottTodd commented Jul 14, 2020 •

Copy link
Copy Markdown
Member

We've been passing with this enabled before, but were not enforcing it in open source builds.

@GMNGeoffrey

Copy link
Copy Markdown
Member

Maybe add a justification, e.g.:

This warning is enabled in Google's source repository and is generally considered useful. Having it OSS avoids errors that occur on import to Google's repository.

@benvanik

Copy link
Copy Markdown
Collaborator

Enable this for cmake too - as much as possible we shouldn't have different warning/error sets between the two.

@ScottTodd

Copy link
Copy Markdown
Member Author

Maybe add a justification, e.g.:

This warning is enabled in Google's source repository and is generally considered useful. Having it OSS avoids errors that occur on import to Google's repository.

Sure. Rephrased a bit to focus less on Google quirks.

@ScottTodd

Copy link
Copy Markdown
Member Author

Enable this for cmake too - as much as possible we shouldn't have different warning/error sets between the two.

Good catch, done.

@ScottTodd
ScottTodd merged commit b093bdd into iree-org:main Jul 14, 2020
@ScottTodd
ScottTodd deleted the warning-unused-variable branch July 14, 2020 17:29
@ScottTodd ScottTodd mentioned this pull request Jul 14, 2020
GMNGeoffrey added a commit that referenced this pull request Jul 16, 2020
We already pass with all of these, but haven't had them enabled in OSS
builds. Rather than piecemeal enabling warnings, let's just turn ~all
of them on. This is pretty much the set used at Google (+/-, it's spread 
across quite a few files so difficult to track everything down), so
this also reduces maintainer pain encountering these errors on import.

This will avoid having to do this one at a time like in
#2296 and
#2294 and
#2513
GMNGeoffrey added a commit to GMNGeoffrey/iree that referenced this pull request Jul 16, 2020
…#2541)

We already pass with all of these, but haven't had them enabled in OSS
builds. Rather than piecemeal enabling warnings, let's just turn ~all
of them on. This is pretty much the set used at Google (+/-, it's spread
across quite a few files so difficult to track everything down), so
this also reduces maintainer pain encountering these errors on import.

This will avoid having to do this one at a time like in
iree-org#2296 and
iree-org#2294 and
iree-org#2513
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants