From 55d12cfe3a1d5b6fe15b7154d604386f113f746f Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Thu, 6 Jan 2022 17:12:59 -0600 Subject: [PATCH] mpi: use pointers for array_of_statuses Apparently some compilers -- gcc-11.2 -- will differentiate between MPI_Status array_of_statuses[] and MPI_Status *array_of_statuses and warns if we pass MPI_STATUSES_IGNORE to the former. Note: the standard uses the latter form. --- maint/local_python/binding_common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maint/local_python/binding_common.py b/maint/local_python/binding_common.py index 542d1c38e4a..5d52649df5a 100644 --- a/maint/local_python/binding_common.py +++ b/maint/local_python/binding_common.py @@ -139,6 +139,10 @@ def get_C_param(param, func, mapping): else: # MPI_Init, MPI_Init_thread -> char ***argv want_star = 3 + elif kind == "STATUS" and param['length'] is not None: + # MPI_{Wait,Test}{all,some} + # gcc-11 warns when we pass MPI_STATUSES_IGNORE to MPI_Status statues[] + want_star = 1 elif not want_star: if is_pointer_type(param): if kind == "STRING_ARRAY":