framework: resolve compiler warnings#623
Conversation
|
@Treece-Burgess There are also some compiler warnings in the |
I can take care of the cuda component compilation warnings. |
When a build is configured with --enable-warnings, there are unused-variable and sign-compare warnings. These changes resolve the warnings. These changes have been tested on a system containing the ARM Neoverse-V2 CPU and the NVIDIA GH200 480GB GPU (Grace-Hopper architecture).
3935642 to
48a8c77
Compare
Treece-Burgess
left a comment
There was a problem hiding this comment.
I have been able to recreate the compilation warnings on Hopper1 at Oregon (CPU: ARM Neoverse V2, GPU: 1 * NVIDIA GH200) with the configure ./configure --prefix=$PWD/test-install --enable-warnings --with-debug=yes:
papi.c:4065:13: warning: unused variable ‘ret’ [-Wunused-variable]
4065 | int ret;
papi_preset.c:1648:57: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
1648 | for (pos = component_prefix_offset; pos < strlen(basename); pos++) {
This PR resolves the compilation warnings. As a sanity check I ran ./papi_avail and ./papi_command_line PAPI_FP_OPS as this change is made in papi_preset.c. Both functioned as expected.
Pull Request Description
When a build is configured with --enable-warnings, there are unused-variable and sign-compare warnings:
This PR resolves these warnings.
These changes have been tested on a system containing the ARM Neoverse-V2 CPU and the NVIDIA GH200 480GB GPU (Grace-Hopper architecture).
Author Checklist
Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
Commits are self contained and only do one thing
Commits have a header of the form:
module: short descriptionCommits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
The PR needs to pass all the tests