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

Fix 2 compile warning #110

Merged
merged 2 commits into from
Sep 5, 2023
Merged

Fix 2 compile warning #110

merged 2 commits into from
Sep 5, 2023

Conversation

wkliao
Copy link
Member

@wkliao wkliao commented Sep 5, 2023

See individual commit comments on warning messages.

ncmpio_filetype.c: In function 'type_create_subarray64.constprop':
ncmpio_filetype.c:154:21: warning: 'MPI_Type_create_subarray' reading 4 bytes from a region of size 0 [-Wstringop-overread]
154 |         mpireturn = MPI_Type_create_subarray(ndims, sizes, subsizes, starts,
    |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155 |                                              order, oldtype, newtype);
    |                                              ~~~~~~~~~~~~~~~~~~~~~~~~
ncmpio_filetype.c:154:21: note: referencing argument 3 of type 'const int *'
ncmpio_filetype.c:154:21: warning: 'MPI_Type_create_subarray' reading 4 bytes from a region of size 0 [-Wstringop-overread]
ncmpio_filetype.c:154:21: note: referencing argument 4 of type 'const int *'
In file included from ncmpio_filetype.c:18:
/opt/cray/pe/mpich/8.1.25/ofi/gnu/9.1/include/mpi.h:1362:5: note: in a call to function 'MPI_Type_create_subarray'
1362 | int MPI_Type_create_subarray(int ndims, const int array_of_sizes[],
     |     ^~~~~~~~~~~~~~~~~~~~~~~~
when -Wimplicit-const-int-float-conversion is used.

 ncx.c:2824:12: warning: implicit conversion from 'long long' to 'float' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
         if (xx == LONGLONG_MAX)      *ip = LONGLONG_MAX;
                ~~ ^~~~~~~~~~~~
 ncx.c:64:22: note: expanded from macro 'LONGLONG_MAX'
 #define LONGLONG_MAX LONG_LONG_MAX
                      ^~~~~~~~~~~~~
 ncx.c:61:23: note: expanded from macro 'LONG_LONG_MAX'
 #define LONG_LONG_MAX LLONG_MAX
                       ^~~~~~~~~
 /opt/intel/oneapi/compiler/2023.1.0/linux/lib/clang/16/include/limits.h:103:20: note: expanded from macro 'LLONG_MAX'
 #define LLONG_MAX  __LONG_LONG_MAX__
                    ^~~~~~~~~~~~~~~~~
 <built-in>:52:27: note: expanded from here
 #define __LONG_LONG_MAX__ 9223372036854775807LL
                           ^~~~~~~~~~~~~~~~~~~~~
@wkliao wkliao merged commit 92ba286 into master Sep 5, 2023
4 checks passed
@wkliao wkliao deleted the compile_warning branch September 24, 2023 18:42
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.

1 participant