Skip to content

Commit

Permalink
Merge pull request ESMCI#1541 from NCAR/ejh_warn_more_4
Browse files Browse the repository at this point in the history
More fortran warnings, also turn on -Werror for C code
  • Loading branch information
edhartnett authored Jun 27, 2019
2 parents 9ab5f53 + 0623647 commit 80c569d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
39 changes: 18 additions & 21 deletions src/flib/pio_nf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ module pio_nf
end interface pio_inq_dimlen
interface pio_inq_ndims
module procedure &
inq_ndims_desc , &
inq_ndims_id
! inq_ndims_desc , &
end interface pio_inq_ndims
interface pio_inq_dimid
module procedure &
Expand All @@ -200,13 +200,13 @@ module pio_nf

interface pio_inq_nvars
module procedure &
inq_nvars_desc , &
inq_nvars_id
! inq_nvars_desc
end interface pio_inq_nvars
interface pio_inq_natts
module procedure &
inq_natts_desc , &
inq_natts_id
! inq_natts_desc
end interface pio_inq_natts
interface pio_inq_unlimdim
module procedure &
Expand Down Expand Up @@ -474,7 +474,6 @@ end function PIOc_inq_dimname

end function inq_dimname_id

!>
!! @public
!! @ingroup PIO_inquire
!! Get information about the number of dimensions of a file or
Expand All @@ -485,11 +484,11 @@ end function inq_dimname_id
!! @retval ierr @copydoc error_return
!! @author Jim Edwards
!<
integer function inq_ndims_desc(File , ndims) result(ierr)
type (File_desc_t) , intent(inout) :: File
integer , intent(out) :: ndims
ierr = inq_ndims_id(file%fh , ndims)
end function inq_ndims_desc
! integer function inq_ndims_desc(File, ndims) result(ierr)
! type (File_desc_t), intent(inout) :: File
! integer, intent(out) :: ndims
! ierr = inq_ndims_id(file%fh, ndims)
! end function inq_ndims_desc

!>
!! @public
Expand All @@ -512,7 +511,6 @@ end function PIOc_inq_ndims
ierr = PIOc_inq_ndims(ncid ,ndims)
end function inq_ndims_id

!>
!! @public
!! @ingroup PIO_inquire
!! Get information about the number of variables in a file or group.
Expand All @@ -522,11 +520,11 @@ end function inq_ndims_id
!! @retval ierr @copydoc error_return
!! @author Jim Edwards
!<
integer function inq_nvars_desc(File , nvars) result(ierr)
type (File_desc_t) , intent(inout) :: File
integer , intent(out) :: nvars
ierr = inq_nvars_id(file%fh , nvars)
end function inq_nvars_desc
! integer function inq_nvars_desc(File, nvars) result(ierr)
! type (File_desc_t), intent(inout) :: File
! integer, intent(out) :: nvars
! ierr = inq_nvars_id(file%fh, nvars)
! end function inq_nvars_desc

!>
!! @public
Expand All @@ -548,7 +546,6 @@ end function PIOc_inq_nvars
ierr = PIOc_inq_nvars(ncid ,nvars)
end function inq_nvars_id

!>
!! @public
!! @ingroup PIO_inquire
!! Get information about the number of global attributes in a file
Expand All @@ -559,11 +556,11 @@ end function inq_nvars_id
!! @retval ierr @copydoc error_return
!! @author Jim Edwards
!<
integer function inq_natts_desc(File , natts) result(ierr)
type (File_desc_t) , intent(inout) :: File
integer , intent(out) :: natts
ierr = inq_natts_id(file%fh , natts)
end function inq_natts_desc
! integer function inq_natts_desc(File, natts) result(ierr)
! type (File_desc_t), intent(inout) :: File
! integer, intent(out) :: natts
! ierr = inq_natts_id(file%fh, natts)
! end function inq_natts_desc

!>
!! @public
Expand Down
3 changes: 2 additions & 1 deletion src/flib/pio_support.F90
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ integer(c_int) function PIOc_writemap_from_f90(file, ndims, gdims, maplen, map,
integer(C_INT), value, intent(in) :: f90_comm
end function PIOc_writemap_from_f90
end interface
if (present(punit)) continue ! to suppress warning
ndims = size(gdims)
err = PIOc_writemap_from_f90(trim(file)//C_NULL_CHAR, ndims, gdims, int(size(dof),C_SIZE_T), dof, comm)

Expand Down Expand Up @@ -207,7 +208,7 @@ integer(C_INT) function PIOc_readmap_from_f90(file, ndims, gdims, maplen, map, f
integer(C_INT), value, intent(in) :: f90_comm
end function PIOc_readmap_from_f90
end interface

if (present(punit)) continue ! to suppress warning
ierr = PIOc_readmap_from_f90(trim(file)//C_NULL_CHAR, ndims, tgdims, maplen, tmap, comm);

call c_f_pointer(tgdims, gdims, (/ndims/))
Expand Down

0 comments on commit 80c569d

Please sign in to comment.