Skip to content

Commit

Permalink
gnu reports an error if this unused variable is not allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jul 9, 2024
1 parent 47fb4e6 commit 96c9095
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mediator/med_phases_aofluxes_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,10 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r
if (add_gusts) then
call fldbun_getfldptr(fldbun_a, 'Faxa_rainc', aoflux_in%rainc, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
else
! rainc is not used without add_gusts but some compilers complain about the unallocated pointer
! in the subroutine interface
allocate(aoflux_in%rainc(1))
end if
end if

Expand Down

0 comments on commit 96c9095

Please sign in to comment.