Commit 333572d9 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl

Prevent compiler error due to uninitialized value

Another blocker for the SuSE build server: Even though the variable is
later not actually used by the function, a recent GCC complains about
the use of an uninitialized value for that variable.

This prevents build on the OBS, as they use compiliation flags that
detect such behaviour.

Error message there:

 ../test/C/driver/legacy_interface/legacy_real_driver_c_version.c:193:12: warning: 'THIS_REAL_ELPA_KERNEL_API' is used uninitialized in this function [-Wuninitialized]
     success = elpa_solve_evp_real_double(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_REAL_ELPA_KERNEL_API, useQr, useGPU,

 [...]

 I: Program is using uninitialized variables.
    Note the difference between "is used" and "may be used"
 W: elpa uninitialized-variable ../test/C/driver/legacy_interface/legacy_real_driver_c_version.c:193
parent a92da426
......@@ -190,7 +190,7 @@ int main(int argc, char** argv) {
useQr = 0;
useGPU = 0;
success = elpa_solve_evp_real_double(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_REAL_ELPA_KERNEL_API, useQr, useGPU, "1stage");
success = elpa_solve_evp_real_double(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, -1, useQr, useGPU, "1stage");
if (success != 1) {
printf("error in ELPA solve \n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment