Skip to content

Commit ecd1f42

Browse files
authored
Merge pull request #12393 from bosilca/topic/no_warnings_on_int_to_fint_conversion
Remove warnings about compare to self
2 parents 8591403 + c68976d commit ecd1f42

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ompi/mpi/fortran/base/fint_2_int.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
1414
* Copyright (c) 2014-2019 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
16+
* Copyright (c) 2024 NVIDIA Corporation. All rights reserved.
1617
* $COPYRIGHT$
1718
*
1819
* Additional copyrights may follow
@@ -32,17 +33,17 @@
3233
*/
3334

3435
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
35-
#define OMPI_ARRAY_NAME_DECL(a)
36-
#define OMPI_2_DIM_ARRAY_NAME_DECL(a, dim2)
36+
#define OMPI_ARRAY_NAME_DECL(a) int *c_##a
37+
#define OMPI_2_DIM_ARRAY_NAME_DECL(a, dim2) int (*c_##a)[dim2]
3738
#define OMPI_SINGLE_NAME_DECL(a)
38-
#define OMPI_ARRAY_NAME_CONVERT(a) a
39+
#define OMPI_ARRAY_NAME_CONVERT(a) c_##a
3940
#define OMPI_SINGLE_NAME_CONVERT(a) a
4041
#define OMPI_INT_2_FINT(a) a
4142
#define OMPI_FINT_2_INT(a) a
4243
#define OMPI_PFINT_2_PINT(a) a
43-
#define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n)
44-
#define OMPI_ARRAY_FINT_2_INT(in, n)
45-
#define OMPI_2_DIM_ARRAY_FINT_2_INT(in, n, dim2)
44+
#define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) { OMPI_ARRAY_NAME_CONVERT(in) = in; }
45+
#define OMPI_ARRAY_FINT_2_INT(in, n) { OMPI_ARRAY_NAME_CONVERT(in) = in; }
46+
#define OMPI_2_DIM_ARRAY_FINT_2_INT(in, n, dim2) { OMPI_ARRAY_NAME_CONVERT(in) = in; }
4647
#define OMPI_ARRAY_FINT_2_INT_CLEANUP(in)
4748
#define OMPI_SINGLE_FINT_2_INT(in)
4849
#define OMPI_SINGLE_INT_2_FINT(in)

0 commit comments

Comments
 (0)