From 90b220cbd058af97b4d5436e0f4299393c96418e Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Thu, 18 Aug 2011 16:39:51 -0500 Subject: [svn-r21259] Bug fix: Compilation failed for these two examples due to the wrong type of constant. Changed constant 0 to 0_size_t to use the correct type in the h5tinsert_f subroutine. Platfomr tested: Elena's mac air with gfortran 4.6 --- fortran/examples/compound_fortran2003.f90 | 2 +- fortran/examples/nested_derived_type.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fortran/examples/compound_fortran2003.f90 b/fortran/examples/compound_fortran2003.f90 index 579be61..a55d1a6 100644 --- a/fortran/examples/compound_fortran2003.f90 +++ b/fortran/examples/compound_fortran2003.f90 @@ -186,7 +186,7 @@ PROGRAM main ! CALL H5Tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(s3(1)),C_LOC(s3(2))),s3_tid, hdferr) - CALL H5Tinsert_f(s3_tid, "b_name", 0, h5kind_to_type(r_k4,H5_REAL_KIND), hdferr) + CALL H5Tinsert_f(s3_tid, "b_name", 0_size_t, h5kind_to_type(r_k4,H5_REAL_KIND), hdferr) ! ! Read field b from s1 dataset. Field in the file is found by its name. ! diff --git a/fortran/examples/nested_derived_type.f90 b/fortran/examples/nested_derived_type.f90 index b79c208..f806110 100644 --- a/fortran/examples/nested_derived_type.f90 +++ b/fortran/examples/nested_derived_type.f90 @@ -190,7 +190,7 @@ PROGRAM main ! CALL H5Tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(s3(1)),C_LOC(s3(2))),s3_tid, hdferr) - CALL H5Tinsert_f(s3_tid, "b_name", 0, h5kind_to_type(r_k4,H5_REAL_KIND), hdferr) + CALL H5Tinsert_f(s3_tid, "b_name", 0_size_t, h5kind_to_type(r_k4,H5_REAL_KIND), hdferr) ! ! Read field b from s1 dataset. Field in the file is found by its name. ! -- cgit v0.12