cabouman / mbircone

BSD 3-Clause "New" or "Revised" License
11 stars 9 forks source link

Compiler warning #132

Closed cabouman closed 9 months ago

cabouman commented 1 year ago

The compiler is issuing what may be a serious warning:

mbircone/src/MBIRModularUtilities3D.c: In function 'backProjectlike3DCone':
mbircone/src/MBIRModularUtilities3D.c:61:13: warning: 'normalization' is used uninitialized [-Wuninitialized]
   61 |     #pragma omp parallel for private(j_x, j_y, j_u, i_v, B_ij, j_z, i_w, A_ij, val)
      |             ^~~
mbircone/src/MBIRModularUtilities3D.c:43:14: note: 'normalization' was declared here
   43 |     float ***normalization, val, val2;
      |              ^~~~~~~~~~~~~

It looks like the array normalization is being used without initialization or even allocation of the memory. I'm surprised that we aren't getting a segmentation fault. We need to track this down, and fix both the warning and any underlying bug. We should check with Thilo to make sure that whatever we do is correct.

DamonLee5 commented 1 year ago

Fixed it in branch fix_warning_normalization.