Skip to content

Commit f2eab6b

Browse files
committed
h5attr read: remove unused param H5S_ALL_F
this unused parameter caused problems for GCC-7 recognizing TKR. Making the arguments optional caused problems with all compilers recognizing TKR
1 parent 44cc39d commit f2eab6b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/attr_read.f90

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
submodule (h5fortran:attr_smod) attr_read
22

3-
use, intrinsic :: iso_c_binding, only : C_CHAR, C_NULL_CHAR, C_F_POINTER
4-
5-
use hdf5, only : H5Aread_f, H5Aget_type_f, &
6-
H5Tget_class_f, H5Tget_native_type_f, H5Tget_size_f, H5Tget_strpad_f, &
7-
H5T_DIR_ASCEND_F, &
8-
H5S_ALL_F
3+
use hdf5, only : H5Aread_f
94

105
implicit none
116

src/attr_read.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ if(attr_class == H5T_FLOAT_F .OR. attr_class == H5T_INTEGER_F) then
3838
elseif(attr_class == H5T_STRING_F) then
3939
select type(A)
4040
type is (character(*)) !< kind=c_char too
41-
call read_char(self, obj_name//":"//attr_name, A, attr_id, H5S_ALL_F, space_id)
41+
call read_char(self, obj_name//":"//attr_name, A, attr_id, 0_HID_T, space_id)
42+
!! the "0_HID_T" is unused by H5Aread_F. GCC 7 doesn't like H5S_ALL_F, and it's unused anyway
43+
!! making this argument optional in read_char() caused problems with all compilers recognizing the TKR
4244
class default
4345
error stop 'ERROR:h5fortran:readattr: string dataset ' // obj_name // ':' // attr_name // ' needs character memory variable'
4446
end select

0 commit comments

Comments
 (0)