Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

build: fix or suppress warnings#8485

Closed
refack wants to merge 4 commits intonodejs:v0.12from
node4good:no-warn
Closed

build: fix or suppress warnings#8485
refack wants to merge 4 commits intonodejs:v0.12from
node4good:no-warn

Conversation

@refack
Copy link
Copy Markdown
Contributor

@refack refack commented Oct 2, 2014

  • activated "treat warnings as errors"

@trevnorris
Copy link
Copy Markdown

/cc @orangemocha @indutny

Comment thread common.gypi Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This makes sense.

@refack
Copy link
Copy Markdown
Contributor Author

refack commented Oct 8, 2014

P.S. this is the output on compiling the node target with all warnings enabled:
https://gist.github.com/refack/65eb7b126e1c9b697134

@refack
Copy link
Copy Markdown
Contributor Author

refack commented Oct 8, 2014

Refactored the whole thing.

Comment thread .gitignore
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing newline.

@indutny
Copy link
Copy Markdown
Member

indutny commented Oct 8, 2014

Some nits, but mostly LGTM

@refack
Copy link
Copy Markdown
Contributor Author

refack commented Oct 8, 2014

Dropped the whole style fix commit.
I still need convincing about 'WarnAsError'. Again it's MSVS only, and it works. The compiler is our friend why not use it. If someone introduces a new warning to the windows build someone must look at it.
The logic behind 'cflags!': ['-Werror'] is explained in the comment, but here it's a specific compiler suite on a specific OS why let it accumulate warnings, as it has till now.

@refack
Copy link
Copy Markdown
Contributor Author

refack commented Oct 8, 2014

rebased on #8476

@orangemocha
Copy link
Copy Markdown
Contributor

Most developers build/test their changes on one platform. Since not everybody builds on Windows, treating warning as errors will cause a lot of build breaks!
I hope that one day we will have a better continuous integration infrastructure that will build/test every PR on all platforms. If we had that, we could turn WarnAsError on, but until then I believe it will bring more trouble than benefit.

Comment thread common.gypi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With the exception of maybe C4351, I don't think it's a good idea to disable these warnings. And for warnings that cannot be fixed, like the ones about deprecation, it would be better to disable them in the source file using #pragma

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are here for deps sake. Only 4244, 4267 are allowed in node code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants