Skip to content

Commit

Permalink
Fixed data typing errors discovered by promoting integers and reals. (H…
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld authored Oct 11, 2024
1 parent 5e8fd61 commit 6b43197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions fortran/src/H5Rff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -856,13 +856,13 @@ INTEGER(C_INT) FUNCTION H5Requal(ref1_ptr, ref2_ptr) &
END FUNCTION H5Requal
END INTERFACE

c_equal = INT(H5Requal(ref1_ptr, ref2_ptr))
c_equal = INT(H5Requal(ref1_ptr, ref2_ptr), C_INT)

hdferr = 0
equal = .FALSE.
IF(c_equal .EQ. 1)THEN
IF(c_equal .EQ. 1_C_INT)THEN
equal = .TRUE.
ELSE IF(c_equal .LT. 0)THEN
ELSE IF(c_equal .LT. 0_C_INT)THEN
hdferr = -1
ENDIF

Expand Down
5 changes: 3 additions & 2 deletions fortran/src/H5VLff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ SUBROUTINE H5VLcmp_connector_cls_f(are_same, conn_id1, conn_id2, hdferr)
INTEGER(HID_T), INTENT(IN) :: conn_id1
INTEGER(HID_T), INTENT(IN) :: conn_id2
INTEGER, INTENT(OUT) :: hdferr
INTEGER :: are_same_c

INTEGER(C_INT) :: are_same_c

INTERFACE
INTEGER(C_INT) FUNCTION H5VLcmp_connector_cls(cmp_value, conn_id1, conn_id2) BIND(C, NAME='H5VLcmp_connector_cls')
Expand All @@ -432,7 +433,7 @@ END FUNCTION H5VLcmp_connector_cls

are_same = .FALSE.
hdferr = INT(H5VLcmp_connector_cls(are_same_c, conn_id1, conn_id2))
IF(are_same_c .EQ. 0) are_same = .TRUE.
IF(are_same_c .EQ. 0_C_INT) are_same = .TRUE.

END SUBROUTINE H5VLcmp_connector_cls_f

Expand Down

0 comments on commit 6b43197

Please sign in to comment.