-
Notifications
You must be signed in to change notification settings - Fork 266
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
Fix warnings #1281
Merged
Merged
Fix warnings #1281
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
eda449b
ncconfigure: add NC_UNUSED macro
mathstuf a747216
warnings: mark conditionally used parameters
mathstuf eb0b9b8
ncuri: check the right preprocessor definition
mathstuf b3f3443
warnings: mark unused parameters
mathstuf 94a0259
NC_mktmp: pass the remaining space to strncat
mathstuf 8c33122
warnings: store sizes in size_t
mathstuf 82d72df
nctime: expand basetime's size
mathstuf 688c06d
Merge branch 'master' into fix-warnings
WardF 9ca942b
Merge branch 'master' into fix-warnings
WardF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I disagree with this. This clutters up the code only in order to suppress warnings? That's what a warning suppression file is for.
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.
These warnings appear from VTK's embedding of NetCDF into its source tree (mainly for Windows users' convenience) where these warnings appear with our default CI configurations. We can certainly keep the patches in our import, but I'm trying to minimize our diffs against upstream code.
As for clutter, I don't see this as "clutter". It's an explicit acknowledgement that
path
is not used in the non-parallel path. I wish there were a way to say "warn if this line is no longer necessary", but I don't know of any. This line also fixes the warning for all known compilers with any given set of warning flags. Doing per-compiler suppression regexes or pragmas is, IME, way more complicated.I can also go back to the literal
(void)path;
code rather than adding a new (internal) macro. Would adding a// unused parameter
comment on the lines help?