Skip to content

Commit 06e7c80

Browse files
Removes all implicit conversions and add -Werror=conversion to the CI
1 parent 5792a1d commit 06e7c80

31 files changed

+63
-65
lines changed

.github/workflows/cmake.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ on:
3434
- '!**md'
3535

3636
env:
37-
CFLAGS: "-flto -Wall -pedantic-errors"
37+
CFLAGS: "-flto -Wall -Werror=conversion -pedantic-errors"
3838
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
3939

4040
defaults:
@@ -61,8 +61,8 @@ jobs:
6161
matrix:
6262
os: [ macos-latest, ubuntu-latest ]
6363
fflags: [
64-
"-flto -Wall -fimplicit-none -frecursive -fcheck=all",
65-
"-flto -Wall -fimplicit-none -frecursive -fcheck=all -fopenmp" ]
64+
"-flto -Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all",
65+
"-flto -Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp" ]
6666

6767
steps:
6868

.github/workflows/makefile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ on:
3434
env:
3535
CC: "gcc"
3636
FC: "gfortran"
37-
CFLAGS: "-O3 -flto -Wall -pedantic-errors"
38-
FFLAGS: "-O2 -flto -Wall -fimplicit-none -frecursive -fopenmp -fcheck=all"
37+
CFLAGS: "-O3 -flto -Wall -Werror=conversion -pedantic-errors"
38+
FFLAGS: "-O2 -flto -Wall -Werror=conversion -pedantic -fimplicit-none -frecursive -fopenmp -fcheck=all"
3939
FFLAGS_NOOPT: "-O0 -flto -Wall -fimplicit-none -frecursive -fopenmp -fcheck=all"
4040
LDFLAGS: ""
4141
AR: "ar"

LAPACKE/example/example_DGELS_rowmajor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
int main (int argc, const char * argv[])
6565
{
6666
/* Locals */
67-
double A[5][3] = {1,1,1,2,3,4,3,5,2,4,2,5,5,4,3};
68-
double b[5][2] = {-10,-3,12,14,14,12,16,16,18,16};
67+
double A[5][3] = {{1,1,1},{2,3,4},{3,5,2},{4,2,5},{5,4,3}};
68+
double b[5][2] = {{-10,-3},{12,14},{14,12},{16,16},{18,16}};
6969
lapack_int info,m,n,lda,ldb,nrhs;
7070

7171
/* Initialization */

LAPACKE/src/lapacke_cgesvdq.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp,
4848
lapack_int lrwork = -1;
4949
float* rwork = NULL;
5050
float rwork_query;
51-
lapack_int i;
5251
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
5352
LAPACKE_xerbla( "LAPACKE_cgesvdq", -1 );
5453
return -1;

LAPACKE/src/lapacke_dgesvdq.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ lapack_int LAPACKE_dgesvdq( int matrix_layout, char joba, char jobp,
4848
lapack_int lrwork = -1;
4949
double* rwork = NULL;
5050
double rwork_query;
51-
lapack_int i;
5251
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
5352
LAPACKE_xerbla( "LAPACKE_dgesvdq", -1 );
5453
return -1;

LAPACKE/src/lapacke_sgesvdq.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ lapack_int LAPACKE_sgesvdq( int matrix_layout, char joba, char jobp,
4848
lapack_int lrwork = -1;
4949
float* rwork = NULL;
5050
float rwork_query;
51-
lapack_int i;
5251
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
5352
LAPACKE_xerbla( "LAPACKE_sgesvdq", -1 );
5453
return -1;

LAPACKE/src/lapacke_zgesvdq.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ lapack_int LAPACKE_zgesvdq( int matrix_layout, char joba, char jobp,
4848
lapack_int lrwork = -1;
4949
double* rwork = NULL;
5050
double rwork_query;
51-
lapack_int i;
5251
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
5352
LAPACKE_xerbla( "LAPACKE_zgesvdq", -1 );
5453
return -1;

TESTING/EIG/cdrvsg.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,8 @@ SUBROUTINE CDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
663663
IL = 1
664664
IU = N
665665
ELSE
666-
IL = 1 + ( N-1 )*SLARND( 1, ISEED2 )
667-
IU = 1 + ( N-1 )*SLARND( 1, ISEED2 )
666+
IL = 1 + INT( ( N-1 )*SLARND( 1, ISEED2 ) )
667+
IU = 1 + INT( ( N-1 )*SLARND( 1, ISEED2 ) )
668668
IF( IL.GT.IU ) THEN
669669
ITEMP = IL
670670
IL = IU

TESTING/EIG/cget37.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ SUBROUTINE CGET37( RMAX, LMAX, NINFO, KNT, NIN )
265265
100 CONTINUE
266266
WSRT( KMIN ) = WSRT( I )
267267
WSRT( I ) = VMIN
268-
VCMIN = WTMP( I )
268+
VCMIN = REAL( WTMP( I ) )
269269
WTMP( I ) = W( KMIN )
270270
WTMP( KMIN ) = VCMIN
271271
VMIN = STMP( KMIN )

TESTING/EIG/ddrvsg.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,8 @@ SUBROUTINE DDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
645645
IL = 1
646646
IU = N
647647
ELSE
648-
IL = 1 + ( N-1 )*DLARND( 1, ISEED2 )
649-
IU = 1 + ( N-1 )*DLARND( 1, ISEED2 )
648+
IL = 1 + INT( ( N-1 )*DLARND( 1, ISEED2 ) )
649+
IU = 1 + INT( ( N-1 )*DLARND( 1, ISEED2 ) )
650650
IF( IL.GT.IU ) THEN
651651
ITEMP = IL
652652
IL = IU

0 commit comments

Comments
 (0)