Skip to content

Commit

Permalink
Remove warning unused-variable and unused-parameter from compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyril Gandon committed Oct 3, 2024
1 parent c663dc1 commit a59f016
Show file tree
Hide file tree
Showing 24 changed files with 29 additions and 38 deletions.
2 changes: 1 addition & 1 deletion example/hashmaps/example_hashmaps_get_other_data.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
program example_get_other_data
use stdlib_kinds, only: int8, int64
use stdlib_hashmaps, only: chaining_hashmap_type, int_index
use stdlib_hashmaps, only: chaining_hashmap_type
use stdlib_hashmap_wrappers, only: fnv_1_hasher, key_type, other_type, set, get
implicit none
logical :: conflict
Expand Down
2 changes: 1 addition & 1 deletion example/hashmaps/example_hashmaps_remove.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
program example_remove
use stdlib_kinds, only: int8, int64
use stdlib_hashmaps, only: open_hashmap_type, int_index
use stdlib_hashmaps, only: open_hashmap_type
use stdlib_hashmap_wrappers, only: fnv_1_hasher, &
fnv_1a_hasher, key_type, other_type, set
implicit none
Expand Down
1 change: 0 additions & 1 deletion example/hashmaps/example_hashmaps_set_other_data.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
program example_set_other_data
use stdlib_kinds, only: int8
use stdlib_hashmaps, only: open_hashmap_type
use stdlib_hashmap_wrappers, only: fnv_1_hasher, &
fnv_1a_hasher, key_type, other_type, set
Expand Down
1 change: 0 additions & 1 deletion example/linalg/example_determinant.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ program example_determinant
use stdlib_kinds, only: dp
use stdlib_linalg, only: det, linalg_state_type
implicit none
type(linalg_state_type) :: err

real(dp) :: d

Expand Down
1 change: 0 additions & 1 deletion example/linalg/example_eigvals.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ program example_eigvals
use stdlib_linalg, only: eigvals
implicit none

integer :: i
real, allocatable :: A(:,:),lambda(:)
complex, allocatable :: cA(:,:),clambda(:)

Expand Down
1 change: 0 additions & 1 deletion example/linalg/example_eigvalsh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ program example_eigvalsh
use stdlib_linalg, only: eigvalsh
implicit none

integer :: i
real, allocatable :: A(:,:),lambda(:)
complex, allocatable :: cA(:,:)

Expand Down
1 change: 0 additions & 1 deletion example/linalg/example_state2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ program example_state2
use stdlib_linalg_state, only: linalg_state_type, LINALG_VALUE_ERROR, LINALG_SUCCESS, &
linalg_error_handling
implicit none
integer :: info
type(linalg_state_type) :: err
real :: a_div_b

Expand Down
2 changes: 1 addition & 1 deletion example/selection/selection_vs_sort.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
program selection_vs_sort
use stdlib_kinds, only: dp, sp, int64
use stdlib_kinds, only: int64
use stdlib_selection, only: select, arg_select
use stdlib_sorting, only: sort
implicit none
Expand Down
2 changes: 0 additions & 2 deletions src/stdlib_linalg_blas_c.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -2549,8 +2549,6 @@ module stdlib_linalg_blas_c
! -- reference blas level1 routine --
! -- reference blas is a software package provided by univ. of tennessee, --
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! Constants
integer, parameter :: wp = kind(1._sp)
! Scaling Constants
! Scalar Arguments
real(sp), intent(out) :: c
Expand Down
4 changes: 0 additions & 4 deletions src/stdlib_linalg_blas_d.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,6 @@ module stdlib_linalg_blas_d
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! march 2021
! Constants
integer, parameter :: wp = kind(1._dp)
real(dp), parameter :: maxn = huge(0.0_dp)
! .. blue's scaling constants ..
! Scalar Arguments
Expand Down Expand Up @@ -985,8 +984,6 @@ module stdlib_linalg_blas_d
! -- reference blas level1 routine --
! -- reference blas is a software package provided by univ. of tennessee, --
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! Constants
integer, parameter :: wp = kind(1._dp)
! Scaling Constants
! Scalar Arguments
real(dp), intent(inout) :: a, b
Expand Down Expand Up @@ -4422,7 +4419,6 @@ module stdlib_linalg_blas_d
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! march 2021
! Constants
integer, parameter :: wp = kind(1._dp)
real(dp), parameter :: maxn = huge(0.0_dp)
! .. blue's scaling constants ..
! Scalar Arguments
Expand Down
4 changes: 0 additions & 4 deletions src/stdlib_linalg_blas_q.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,6 @@ module stdlib_linalg_blas_${ri}$
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! march 2021
! Constants
integer, parameter :: wp = kind(1._${rk}$)
real(${rk}$), parameter :: maxn = huge(0.0_${rk}$)
! .. blue's scaling constants ..
! Scalar Arguments
Expand Down Expand Up @@ -989,8 +988,6 @@ module stdlib_linalg_blas_${ri}$
! -- reference blas level1 routine --
! -- reference blas is a software package provided by univ. of tennessee, --
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! Constants
integer, parameter :: wp = kind(1._${rk}$)
! Scaling Constants
! Scalar Arguments
real(${rk}$), intent(inout) :: a, b
Expand Down Expand Up @@ -4426,7 +4423,6 @@ module stdlib_linalg_blas_${ri}$
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! march 2021
! Constants
integer, parameter :: wp = kind(1._${rk}$)
real(${rk}$), parameter :: maxn = huge(0.0_${rk}$)
! .. blue's scaling constants ..
! Scalar Arguments
Expand Down
3 changes: 0 additions & 3 deletions src/stdlib_linalg_blas_s.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ module stdlib_linalg_blas_s
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! march 2021
! Constants
integer, parameter :: wp = kind(1._sp)
real(sp), parameter :: maxn = huge(0.0_sp)
! .. blue's scaling constants ..
! Scalar Arguments
Expand Down Expand Up @@ -1028,7 +1027,6 @@ module stdlib_linalg_blas_s
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! march 2021
! Constants
integer, parameter :: wp = kind(1._sp)
real(sp), parameter :: maxn = huge(0.0_sp)
! .. blue's scaling constants ..
! Scalar Arguments
Expand Down Expand Up @@ -1166,7 +1164,6 @@ module stdlib_linalg_blas_s
! -- reference blas is a software package provided by univ. of tennessee, --
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! Constants
integer, parameter :: wp = kind(1._sp)
! Scaling Constants
! Scalar Arguments
real(sp), intent(inout) :: a, b
Expand Down
2 changes: 0 additions & 2 deletions src/stdlib_linalg_blas_w.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -2635,8 +2635,6 @@ module stdlib_linalg_blas_${ci}$
! -- reference blas level1 routine --
! -- reference blas is a software package provided by univ. of tennessee, --
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! Constants
integer, parameter :: wp = kind(1._${ck}$)
! Scaling Constants
! Scalar Arguments
real(${ck}$), intent(out) :: c
Expand Down
2 changes: 0 additions & 2 deletions src/stdlib_linalg_blas_z.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -2627,8 +2627,6 @@ module stdlib_linalg_blas_z
! -- reference blas level1 routine --
! -- reference blas is a software package provided by univ. of tennessee, --
! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
! Constants
integer, parameter :: wp = kind(1._dp)
! Scaling Constants
! Scalar Arguments
real(dp), intent(out) :: c
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib_linalg_cholesky.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ submodule (stdlib_linalg) stdlib_linalg_cholesky

!> Local variables
type(linalg_state_type) :: err0
integer(ilp) :: lda,n,info,i,j
integer(ilp) :: lda,n,info,j
logical(lk) :: lower_,other_zeroed_
character :: triangle
${rt}$, parameter :: zero = 0.0_${rk}$
Expand Down
11 changes: 8 additions & 3 deletions src/stdlib_linalg_eigenvalues.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,17 @@ submodule (stdlib_linalg) stdlib_linalg_eigenvalues

!> Local variables
type(linalg_state_type) :: err0
integer(ilp) :: m,n,lda,ldu,ldv,info,k,lwork,lrwork,neig
integer(ilp) :: m,n,lda,ldu,ldv,info,k,lwork,neig
logical(lk) :: copy_a
character :: task_u,task_v
${rt}$, target :: work_dummy(1),u_dummy(1,1),v_dummy(1,1)
${rt}$, allocatable :: work(:)
${rt}$, pointer :: amat(:,:),umat(:,:),vmat(:,:)
#:if rt.startswith('complex')
real(${rk}$), allocatable :: rwork(:)
${rt}$, pointer :: amat(:,:),lreal(:),limag(:),umat(:,:),vmat(:,:)

#:else
${rt}$, pointer :: lreal(:),limag(:)
#:endif
!> Matrix size
m = size(a,1,kind=ilp)
n = size(a,2,kind=ilp)
Expand Down Expand Up @@ -388,7 +391,9 @@ submodule (stdlib_linalg) stdlib_linalg_eigenvalues
character :: triangle,task
${rt}$, target :: work_dummy(1)
${rt}$, allocatable :: work(:)
#:if rt.startswith('complex')
real(${rk}$), allocatable :: rwork(:)
#:endif
${rt}$, pointer :: amat(:,:)

!> Matrix size
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib_linalg_lapack_c.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -38666,7 +38666,7 @@ module stdlib_linalg_lapack_c
! Local Scalars
integer(ilp) :: ncols, i, j, k, kp
real(sp) :: amax, umax, rpvgrw, tmp
logical(lk) :: upper, lsame
logical(lk) :: upper
complex(sp) :: zdum
! Intrinsic Functions
intrinsic :: abs,real,aimag,max,min
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib_linalg_lapack_d.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -6042,7 +6042,7 @@ module stdlib_linalg_lapack_d


! Local Scalars
integer(ilp) :: i, i1, i2, i3, i4, it1, it2, it3, it4, j
integer(ilp) :: i, i1, i2, i3, i4, it1, it2, it3, it4
! Local Arrays
integer(ilp) :: mm(lv,4)
! Intrinsic Functions
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib_linalg_lapack_s.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -6071,7 +6071,7 @@ module stdlib_linalg_lapack_s


! Local Scalars
integer(ilp) :: i, i1, i2, i3, i4, it1, it2, it3, it4, j
integer(ilp) :: i, i1, i2, i3, i4, it1, it2, it3, it4
! Local Arrays
integer(ilp) :: mm(lv,4)
! Intrinsic Functions
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib_linalg_lapack_w.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -35519,7 +35519,7 @@ module stdlib_linalg_lapack_${ci}$
! Local Scalars
integer(ilp) :: ncols, i, j, k, kp
real(${ck}$) :: amax, umax, rpvgrw, tmp
logical(lk) :: upper, lsame
logical(lk) :: upper
complex(${ck}$) :: zdum
! Intrinsic Functions
intrinsic :: abs,real,aimag,max,min
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib_linalg_lapack_z.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -39073,7 +39073,7 @@ module stdlib_linalg_lapack_z
! Local Scalars
integer(ilp) :: ncols, i, j, k, kp
real(dp) :: amax, umax, rpvgrw, tmp
logical(lk) :: upper, lsame
logical(lk) :: upper
complex(dp) :: zdum
! Intrinsic Functions
intrinsic :: abs,real,aimag,max,min
Expand Down
10 changes: 8 additions & 2 deletions src/stdlib_linalg_least_squares.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,18 @@ submodule (stdlib_linalg) stdlib_linalg_least_squares
!! Local variables
type(linalg_state_type) :: err0
integer(ilp) :: m,n,lda,ldb,nrhs,ldx,nrhsx,info,mnmin,mnmax,arank,lrwork,liwork,lcwork
integer(ilp) :: nrs,nis,ncs,nsvd
integer(ilp) :: nrs,nis,nsvd
#:if rt.startswith('complex')
integer(ilp) :: ncs
#:endif
integer(ilp), pointer :: iwork(:)
logical(lk) :: copy_a,large_enough_x
real(${rk}$) :: acond,rcond
real(${rk}$), pointer :: rwork(:),singular(:)
${rt}$, pointer :: xmat(:,:),amat(:,:),cwork(:)
${rt}$, pointer :: xmat(:,:),amat(:,:)
#:if rt.startswith('complex')
${rt}$, pointer :: cwork(:)
#:endif

! Problem sizes
m = size(a,1,kind=ilp)
Expand Down
2 changes: 2 additions & 0 deletions src/stdlib_linalg_svd.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ submodule(stdlib_linalg) stdlib_linalg_svd
character :: task
${rt}$, target :: work_dummy(1),u_dummy(1,1),vt_dummy(1,1)
${rt}$, allocatable :: work(:)
#:if rt.startswith('complex')
real(${rk}$), allocatable :: rwork(:)
#:endif
${rt}$, pointer :: amat(:,:),umat(:,:),vtmat(:,:)

!> Matrix determinant size
Expand Down
4 changes: 2 additions & 2 deletions src/stdlib_specialfunctions_gamma.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ contains
integer :: i

real(${k1}$), parameter :: zero_k1 = 0.0_${k1}$
${t2}$, parameter :: zero = 0.0_${k2}$, half = 0.5_${k2}$, &
${t2}$, parameter :: half = 0.5_${k2}$, &
one = 1.0_${k2}$, pi = acos(- one), sqpi = sqrt(pi)
complex(${k2}$) :: y, x, sum

Expand Down Expand Up @@ -714,7 +714,7 @@ contains
${t1}$, intent(in) :: p
${t2}$, intent(in) :: x
${t2}$ :: res, p_lim, a, b, g, c, d, y
integer :: n, m
integer :: n
${t2}$, parameter :: zero = 0.0_${k2}$, one = 1.0_${k2}$
${t2}$, parameter :: dm = tiny(1.0_${k2}$) * 10 ** 6
${t1}$, parameter :: zero_k1 = 0_${k1}$, two = 2_${k1}$
Expand Down

0 comments on commit a59f016

Please sign in to comment.