Skip to content

Commit

Permalink
Dummy code to suppress errors in posix.F90
Browse files Browse the repository at this point in the history
Adding null read operations so that compilers will not warn about unused
input variables in dummy functions.
  • Loading branch information
marshallward committed Sep 17, 2024
1 parent 0363d2b commit 1830b8e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/framework/posix.F90
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ function setjmp_missing(env) result(rc) bind(c)
error stop

! NOTE: compilers may expect a return value, even if it is unreachable
read env%state
rc = -1
end function setjmp_missing

Expand All @@ -450,6 +451,9 @@ subroutine longjmp_missing(env, val) bind(c)
print '(a)', 'ERROR: longjmp() is not implemented in this build.'
print '(a)', 'Recompile with autoconf or -DLONGJMP_NAME=\"<symbol name>\".'
error stop

read env%state
read char(val)
end subroutine longjmp_missing

!> Placeholder function for a missing or unconfigured sigsetjmp
Expand All @@ -466,6 +470,8 @@ function sigsetjmp_missing(env, savesigs) result(rc) bind(c)
error stop

! NOTE: compilers may expect a return value, even if it is unreachable
read env%state
read char(savesigs)
rc = -1
end function sigsetjmp_missing

Expand All @@ -478,6 +484,8 @@ subroutine siglongjmp_missing(env, val) bind(c)

print '(a)', 'ERROR: siglongjmp() is not implemented in this build.'
print '(a)', 'Recompile with autoconf or -DSIGLONGJMP_NAME=\"<symbol name>\".'
read env%state
read char(val)
error stop
end subroutine siglongjmp_missing

Expand Down

0 comments on commit 1830b8e

Please sign in to comment.