Skip to content

Fix a bunch of compiler warnings #8882

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

Merged
merged 6 commits into from
Apr 29, 2021
Merged

Conversation

jsquyres
Copy link
Member

This doesn't make master compiler-warning free, but it does both remove a bunch of warnings and fix a few genuine (minor) bugs.

See individual commit messages for more details.

NOTE: This PR contains changes to 3rd-party/treematch. @bosilca has previously stated that we have effectively forked from the upstream treematch, so I assume that this is ok. If that's wrong, we can roll the tree match change commit out of this PR.

Copy link
Member

@bwbarrett bwbarrett left a comment

Choose a reason for hiding this comment

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

It was a little difficult to figure out why you were making changes in the first two patches, so perhaps a better commit message there would be nice.

@jsquyres
Copy link
Member Author

It was a little difficult to figure out why you were making changes in the first two patches, so perhaps a better commit message there would be nice.

Fair enough; will do.

Copy link
Contributor

@mdosanjh mdosanjh left a comment

Choose a reason for hiding this comment

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

These changes all look reasonable to me.

Fix compiler warnings about having "shadow" variable declarations.

Signed-off-by: Jeff Squyres <[email protected]>
According to the latest MPI-4.0 draft (as of May 2021), the "buf" arg
to MPI_Precv_init() is not const.

Signed-off-by: Jeff Squyres <[email protected]>
Rename to flags_derived, just to be slightly more clear.

Signed-off-by: Jeff Squyres <[email protected]>
We don't need to have two variables: one named exec_command and one
named exec_cmd.  Consolidate down to just a single variable
(exec_command), and in doing so, fix a compiler warning that
exec_command may not have been initialized (due to confusion between
exec_command and exec_cmd).

Also remove some #if 0/dead code.

Signed-off-by: Jeff Squyres <[email protected]>
- Remove dead code
- Fix shadow variable declarations
- Cast %p arguments to (void*)
- Make integer comparisons agree in sign
- Make a local function static so that it does not require a prior
  declaration

Signed-off-by: Jeff Squyres <[email protected]>
being deleted because, per discussion between @bosilca and @jsquyres
on 29 Apr 2021, @bosilca is pretty sure that this code *should* be
being invoked from somewhere -- otherwise, we likely have a leak in
MPI_FINALIZE.  His team is looking into it.

Signed-off-by: Jeff Squyres <[email protected]>
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.

5 participants