avoid access to unused variable, no need for nested function

This commit is contained in:
Martin Diehl 2023-06-23 08:54:37 +02:00
parent 4e7d953fe9
commit e34ee25597
1 changed files with 31 additions and 31 deletions

View File

@ -56,7 +56,6 @@ subroutine CLI_init()
i
integer, dimension(8) :: &
dateAndTime
integer :: err
external :: &
quit
@ -161,7 +160,6 @@ subroutine CLI_init()
call quit(1)
end if
end select
if (err /= 0) call quit(1)
end do
if (.not. all([allocated(loadcaseArg),allocated(geometryArg),allocated(materialArg)])) then
@ -188,17 +186,19 @@ subroutine CLI_init()
if (CLI_restartInc > 0) &
print'(1x,a,i6.6)', 'Restart from increment: ', CLI_restartInc
contains
!------------------------------------------------------------------------------------------------
end subroutine CLI_init
!--------------------------------------------------------------------------------------------------
!> @brief Get argument from command line.
!------------------------------------------------------------------------------------------------
!--------------------------------------------------------------------------------------------------
function getArg(n)
integer, intent(in) :: n !< number of the argument
character(len=:), allocatable :: getArg
integer :: l,err
external :: quit
allocate(character(len=0)::getArg)
@ -218,8 +218,6 @@ subroutine CLI_init()
end function getArg
end subroutine CLI_init
!--------------------------------------------------------------------------------------------------
!> @brief extract working directory from given argument or from location of geometry file,
@ -229,9 +227,11 @@ subroutine setWorkingDirectory(workingDirectoryArg)
character(len=*), intent(in) :: workingDirectoryArg !< working directory argument
character(len=:), allocatable :: workingDirectory
logical :: error
external :: quit
absolutePath: if (workingDirectoryArg(1:1) == '/') then
workingDirectory = workingDirectoryArg
else absolutePath