Skip to content

Commit c1c39a8

Browse files
Fixed cast-qual and other warnings in LAPACKE
1 parent 3e90359 commit c1c39a8

File tree

6 files changed

+562
-556
lines changed

6 files changed

+562
-556
lines changed

LAPACKE/example/example_DGELS_rowmajor.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ int main (int argc, const char * argv[])
8686
/* Solve least squares problem*/
8787
info = LAPACKE_dgels(LAPACK_ROW_MAJOR,'N',m,n,nrhs,*A,lda,*b,ldb);
8888

89+
if ( info != 0) {
90+
printf("DGELS failed with %d\n", (int) info);
91+
}
8992
/* Print Solution */
9093
print_matrix_rowmajor( "Solution", n, nrhs, *b, ldb );
9194
printf( "\n" );

LAPACKE/example/example_DGELS_rowmajor_64.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ int main (int argc, const char * argv[])
8686
/* Solve least squares problem*/
8787
info = LAPACKE_dgels_64(LAPACK_ROW_MAJOR,'N',m,n,nrhs,*A,lda,*b,ldb);
8888

89+
if ( info != 0 ) {
90+
printf("DGELS failed with info = %d\n", (int) info);
91+
}
8992
/* Print Solution */
9093
print_matrix_rowmajor_64( "Solution", n, nrhs, *b, ldb );
9194
printf( "\n" );

LAPACKE/example/example_DGESV_colmajor_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int main(int argc, char **argv) {
9292
/* Check for the exact singularity */
9393
if( info > 0 ) {
9494
printf( "The diagonal element of the triangular factor of A,\n" );
95-
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
95+
printf( "U(%d,%d) is zero, so that A is singular;\n", (int) info, (int) info );
9696
printf( "the solution could not be computed.\n" );
9797
free(A);
9898
free(b);

LAPACKE/example/example_DGESV_rowmajor_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
8989
/* Check for the exact singularity */
9090
if( info > 0 ) {
9191
printf( "The diagonal element of the triangular factor of A,\n" );
92-
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
92+
printf( "U(%d,%d) is zero, so that A is singular;\n", (int) info, (int) info );
9393
printf( "the solution could not be computed.\n" );
9494
free(A);
9595
free(b);

LAPACKE/example/lapacke_example_aux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ void print_matrix_colmajor_64( char* desc, int64_t m, int64_t n, double* mat, in
6060
void print_vector_64( char* desc, int64_t n, int64_t* vec ) {
6161
int64_t j;
6262
printf( "\n %s\n", desc );
63-
for( j = 0; j < n; j++ ) printf( " %6" LAPACK_IFMT, vec[j] );
63+
for( j = 0; j < n; j++ ) printf( " %6d", (int) vec[j] );
6464
printf( "\n" );
6565
}

0 commit comments

Comments
 (0)