diff options
-rw-r--r-- | config/gnu-cxxflags | 67 | ||||
-rw-r--r-- | config/gnu-fflags | 2 | ||||
-rw-r--r-- | fortran/src/H5_buildiface.F90 | 7 | ||||
-rw-r--r-- | fortran/src/H5f90global.F90 | 1 | ||||
-rw-r--r-- | fortran/src/H5match_types.c | 4 | ||||
-rw-r--r-- | fortran/test/H5_test_buildiface.F90 | 31 | ||||
-rw-r--r-- | fortran/test/tH5D.F90 | 1 | ||||
-rw-r--r-- | fortran/test/tH5F_F03.F90 | 2 | ||||
-rw-r--r-- | fortran/test/tH5P_F03.F90 | 5 | ||||
-rw-r--r-- | hl/fortran/src/H5HL_buildiface.F90 | 7 | ||||
-rw-r--r-- | hl/fortran/test/tstlite.F90 | 2 |
11 files changed, 44 insertions, 85 deletions
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index befaa32..52f46dd 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -175,8 +175,9 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -243,8 +244,9 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc 3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -306,8 +308,9 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -365,8 +368,8 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - # (this warning was removed in gcc 4.5+) + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case @@ -424,8 +427,8 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - # (this warning was removed in gcc 4.5+) + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case @@ -480,8 +483,8 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - # (this warning was removed in gcc 4.5+) + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case @@ -533,8 +536,9 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -582,8 +586,9 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning appears to be reliable now... - H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -628,8 +633,9 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning does not appear to be reliable yet... - H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -668,8 +674,9 @@ case "$cxx_vendor-$cxx_version" in # in -Wall H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2" - # The "unreachable code" warning does not appear to be reliable yet... - H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -705,8 +712,9 @@ case "$cxx_vendor-$cxx_version" in # usage in the library. #CXXFLAGS="$CXXFLAGS -Wformat=2" - # The "unreachable code" warning does not appear to be reliable yet... - #CXXFLAGS="$CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -739,8 +747,9 @@ case "$cxx_vendor-$cxx_version" in # usage in the library. #CXXFLAGS="$CXXFLAGS -Wformat=2" - # The "unreachable code" warning does not appear to be reliable yet... - #CXXFLAGS="$CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -770,8 +779,9 @@ case "$cxx_vendor-$cxx_version" in # usage in the library. #CXXFLAGS="$CXXFLAGS -Wformat=2" - # The "unreachable code" warning does not appear to be reliable yet... - #CXXFLAGS="$CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" # Append more extra warning flags that only gcc3.3+ know about H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels" @@ -795,8 +805,9 @@ case "$cxx_vendor-$cxx_version" in # usage in the library. #CXXFLAGS="$CXXFLAGS -Wformat=2" - # The "unreachable code" warning does not appear to be reliable yet... - #CXXFLAGS="$CXXFLAGS -Wunreachable-code" + # The "unreachable code" flag generates many spurious C++ warnings. + # We'll disable it for now. + #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code" ;; g++-3*) diff --git a/config/gnu-fflags b/config/gnu-fflags index 62498a9..4585735 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -76,7 +76,7 @@ if test "X-gfortran" = "X-$f9x_vendor"; then FC_BASENAME=gfortran40 F9XSUFFIXFLAG="" FSEARCH_DIRS="" - H5_FCFLAGS="$H5_FCFLAGS -pedantic -Wall -Wconversion -Wunderflow -Wimplicit-interface -W" + H5_FCFLAGS="$H5_FCFLAGS -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising" # Turn off warnings for passing non-ANSI types to BIND(). # We pass a lot of hid_t, etc. types so this generates a LOT of spurious warnings. diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index d58b384..bd6ecc3 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -60,13 +60,6 @@ PROGRAM H5_buildiface H5_H5CONFIG_F_IKIND INTEGER :: i, j, k - INTEGER :: ji, jr, jd -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - REAL(KIND=C_LONG_DOUBLE) :: c_longdble -#endif - REAL(KIND=C_DOUBLE) :: c_dble - REAL(KIND=C_FLOAT) :: c_flt - INTEGER :: sizeof_var CHARACTER(LEN=2) :: chr2 ! subroutine rank of array being passed in CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index ac59251..eb7f99f 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -1008,7 +1008,6 @@ CONTAINS IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: f_string CHARACTER(KIND=C_CHAR, LEN=*), INTENT(OUT) :: c_string - INTEGER(SIZE_T) :: c_len, f_len c_string = TRIM(f_string)//C_NULL_CHAR diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index f995e83..98128db 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -52,7 +52,7 @@ FILE * fort_header; void writeTypedef(const char* c_typedef, const char* c_type, int size); void writeTypedefDefault(const char* c_typedef, int size); void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind); -void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind); +void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, const char* kind); static void initCfile(void) @@ -140,7 +140,7 @@ void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); } -void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind) +void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, const char* kind) { fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 index e0323cc..8b27a96 100644 --- a/fortran/test/H5_test_buildiface.F90 +++ b/fortran/test/H5_test_buildiface.F90 @@ -60,38 +60,7 @@ PROGRAM H5_test_buildiface H5_H5CONFIG_F_IKIND INTEGER :: i, j, k - INTEGER :: ji, jr, jd -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - REAL(KIND=C_LONG_DOUBLE) :: c_longdble -#endif - REAL(KIND=C_DOUBLE) :: c_dble - REAL(KIND=C_FLOAT) :: c_flt - INTEGER :: sizeof_var CHARACTER(LEN=2) :: chr2 -! subroutine rank of array being passed in - CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) -! rank definitions - CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & - ' ', & - ', DIMENSION(dims(1)) ', & - ', DIMENSION(dims(1),dims(2)) ', & - ', DIMENSION(dims(1),dims(2),dims(3)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & - /) -! pointer to the buffer - CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & - ' f_ptr = C_LOC(buf) ', & - ' f_ptr = C_LOC(buf(1)) ', & - ' f_ptr = C_LOC(buf(1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & - /) ! Generate Fortran Check routines for the tests KIND interfaces. diff --git a/fortran/test/tH5D.F90 b/fortran/test/tH5D.F90 index c9ba952..849f5eb 100644 --- a/fortran/test/tH5D.F90 +++ b/fortran/test/tH5D.F90 @@ -530,7 +530,6 @@ CONTAINS INTEGER(hid_t) :: file, fcpl, dataset, space INTEGER :: i, j, n, ios INTEGER(hsize_t), DIMENSION(1:2) :: dims - INTEGER :: f INTEGER(haddr_t) :: offset INTEGER, DIMENSION(1:dset_dim1,1:dset_dim2), TARGET :: rdata, data_in INTEGER :: error diff --git a/fortran/test/tH5F_F03.F90 b/fortran/test/tH5F_F03.F90 index 2425bba..e70c1aa 100644 --- a/fortran/test/tH5F_F03.F90 +++ b/fortran/test/tH5F_F03.F90 @@ -62,7 +62,7 @@ SUBROUTINE test_get_file_image(total_error) INTEGER(hid_t) :: dset_id = -1 ! Dataset identifier INTEGER(hid_t) :: space_id = -1 ! Dataspace identifier INTEGER(hsize_t), DIMENSION(1:2) :: dims ! Dataset dimensions - INTEGER(size_t) :: itmp_a, itmp_b ! General purpose integers + INTEGER(size_t) :: itmp_a ! General purpose integer INTEGER(size_t) :: image_size ! Size of image TYPE(C_PTR) :: f_ptr ! Pointer INTEGER(hid_t) :: fapl ! File access property diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90 index f64c4e3..18af36b 100644 --- a/fortran/test/tH5P_F03.F90 +++ b/fortran/test/tH5P_F03.F90 @@ -110,7 +110,6 @@ SUBROUTINE test_create(total_error) INTEGER :: error INTEGER(SIZE_T) :: h5off TYPE(C_PTR) :: f_ptr - LOGICAL :: differ1, differ2 CHARACTER(LEN=1) :: cfill INTEGER :: ifill REAL :: rfill @@ -679,14 +678,13 @@ SUBROUTINE test_vds(total_error) INTEGER(hsize_t), DIMENSION(1:2,1:3) :: vdsdims_out_correct INTEGER(hsize_t), DIMENSION(1:3) :: start_out, & !Hyperslab PARAMETER out - stride_out, count_out, count_correct, block_out + stride_out, count_out, block_out INTEGER(hsize_t), DIMENSION(1:3,1:PLANE_STRIDE) :: start_correct INTEGER :: i, j INTEGER :: layout ! Storage layout INTEGER(size_t) :: num_map ! Number of mappings INTEGER(size_t) :: len ! Length of the string also a RETURN value - CHARACTER(LEN=180) :: filename ! Different sized character buffers CHARACTER(len=LEN(SRC_FILE(1))-3) :: SRC_FILE_LEN_TINY CHARACTER(len=LEN(SRC_FILE(1))-1) :: SRC_FILE_LEN_SMALL @@ -700,7 +698,6 @@ SUBROUTINE test_vds(total_error) INTEGER :: s_type, virtual_view INTEGER :: type1, type2 - CHARACTER(LEN=180) :: dsetname INTEGER, DIMENSION(DIM0_1*DIM1*DIM2), TARGET :: wdata TYPE(C_PTR) :: f_ptr INTEGER(SIZE_T) :: nsize diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 index 9dd879c..15897c3 100644 --- a/hl/fortran/src/H5HL_buildiface.F90 +++ b/hl/fortran/src/H5HL_buildiface.F90 @@ -60,13 +60,6 @@ PROGRAM H5HL_buildiface H5_H5CONFIG_F_IKIND INTEGER :: i, j, k - INTEGER :: ji, jr, jd -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - REAL(KIND=C_LONG_DOUBLE) :: c_longdble -#endif - REAL(KIND=C_DOUBLE) :: c_dble - REAL(KIND=C_FLOAT) :: c_flt - INTEGER :: sizeof_var CHARACTER(LEN=2) :: chr2 ! subroutine rank of array being passed in CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 index 0ba7815..081e61e 100644 --- a/hl/fortran/test/tstlite.F90 +++ b/hl/fortran/test/tstlite.F90 @@ -418,7 +418,6 @@ SUBROUTINE test_dataset3D() #if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 INTEGER, PARAMETER :: int_kind_32 = SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors INTEGER(int_kind_32), DIMENSION(DIM1,DIM2,DIM3), TARGET :: dset_data_i32, data_out_i32 - INTEGER(HID_T) :: dset_id32 ! Dataset identifier CHARACTER(LEN=7), PARAMETER :: dsetname16a = "dset16a" ! Dataset name CHARACTER(LEN=7), PARAMETER :: dsetname16b = "dset16b" ! Dataset name CHARACTER(LEN=7), PARAMETER :: dsetname16c = "dset16c" ! Dataset name @@ -760,7 +759,6 @@ SUBROUTINE test_datasetND(rank) INTEGER :: type_class INTEGER(SIZE_T) :: type_size CHARACTER(LEN=1) :: ichr1 - CHARACTER(LEN=3) :: ichr3 TYPE(C_PTR) :: f_ptr INTEGER(HID_T) :: type_id |