summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-03-08 06:38:33 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-03-08 06:38:33 (GMT)
commita1035bd80624807b3ed31a67575a68f577c0e48c (patch)
tree07a38c27104a83fff5de19d9ac5896a48e35f748
parentb18aaf39f0a9c530d570acf206710d2aa158953e (diff)
downloadhdf5-a1035bd80624807b3ed31a67575a68f577c0e48c.zip
hdf5-a1035bd80624807b3ed31a67575a68f577c0e48c.tar.gz
hdf5-a1035bd80624807b3ed31a67575a68f577c0e48c.tar.bz2
[svn-r29336] Removed unused variables from Fortran code.
Updated gnu Fortran flags. Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 autotools serial w/ Fortran
-rw-r--r--config/gnu-fflags2
-rw-r--r--fortran/src/H5_buildiface.F907
-rw-r--r--fortran/src/H5f90global.F901
-rw-r--r--fortran/test/H5_test_buildiface.F9031
-rw-r--r--fortran/test/tH5D.F901
-rw-r--r--fortran/test/tH5F_F03.F902
-rw-r--r--fortran/test/tH5P_F03.F905
-rw-r--r--hl/fortran/src/H5HL_buildiface.F907
8 files changed, 3 insertions, 53 deletions
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/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"/)