Commit 551465de authored by Andrew Wood's avatar Andrew Wood

Avoid writing uninitialised data.

b%dims wasn't being initialised in some subroutines, but is still
written to the block header.

Although this bug only appears for blocks which don't really need
b%dims, it was breaking sdfdiff.

I've only applied this fix to one file that contained the subroutine
that was causing a problem for me. It might need to be applied to other
files too.
parent 837a2e09
Pipeline #1385 failed with stage
in 0 seconds
......@@ -258,6 +258,7 @@ CONTAINS
b%datatype = c_datatype_logical
b%mpitype = MPI_CHARACTER
b%ndims = 1
b%dims = 0
b%npoints = npoint_global
! Write header
......@@ -396,6 +397,7 @@ CONTAINS
b%datatype = h%datatype_integer
b%mpitype = h%mpitype_integer
b%ndims = 1
b%dims = 0
b%npoints = npoint_global
! Write header
......@@ -596,6 +598,7 @@ CONTAINS
b%blocktype = c_blocktype_point_variable
b%ndims = 1
b%dims = 0
b%npoints = npoint_global
! Write header
......@@ -763,6 +766,7 @@ CONTAINS
ENDIF
b%blocktype = c_blocktype_point_variable
b%ndims = 1
b%dims = 0
b%npoints = npoint_global
! Write header
......
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