Skip to content
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

v5.0.x: Fix a bunch of compiler warnings #12133

Merged
merged 10 commits into from
Nov 28, 2023

Conversation

jsquyres
Copy link
Member

See individual commit messages for details.

This is the v5.0.x PR corresponding to main PR #12129 -- with one exception.

The last commit on this PR, "libdict/hb_tree.c: remove dead code" is not a cherry-pick from main because this warning fix is somehow not relevant to main. I.e., some prior commit must have happened on main to fix this, and then was not cherry-picked. Since it's a straight removal of code, it's a little difficult to track down where this happened and how it wasn't previously cherry-picked. So I just made this one unique fix here on the v5.0.x branch that is not a cherry pick. All the others are cherry-picked from main PR #12129.

bot:notacherrypick

Where appropriate:

* Use __opal_attribute_unused__ (which tells the computer that the
  variable *might* be unused; it does not promise that the variable is
  *not* used)
* Protect usage with various #if macros
* Remove actually-unused variables

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit dbbf187)
Ensure that a buffer is long enough to hold the trailing \0.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 9aab29a)
This code is not referred to anywhere; delete it.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit f848448)
Fix an incorrect assignment of flags: flags_derived is meant to hold
flags of type mca_base_var_syn_flag_t (i.e., synonym flags), whereas
flags holds flags of type mca_base_var_flag_t (i.e., regular flags).
These are two different types of flags, and are not intended to be
mixed.

Hence, initialize the per-variable synonym flags to 0 -- do *not*
initialize them to the value of the regular flags.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 7741cd8)
Fix compiler warnings by changing "()" to "(void)" in some function
definitions.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit a4039d4)
Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 739d2d8)
HAVE__CLEAR_CACHE is either defined or not; it is not defined to 0 or 1.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit cea0e24)
Don't do pointer math on (void*).

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit b7f9221)
Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit c64fb39)
@wenduwan wenduwan merged commit f6550b2 into open-mpi:v5.0.x Nov 28, 2023
10 checks passed
@jsquyres jsquyres deleted the pr/v5.0.x/fix-compiler-warnings branch November 28, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants