The following warnings look like potential memory corruption issues and should be fixed:
libcoda/coda-netcdf.c: In function 'read_att_array':
libcoda/coda-netcdf.c:472:21: warning: 'coda_netcdf_array_new' accessing 64 bytes in a region of size 8 [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overflow=-Wstringop-overflow=8;;]
472 | array = coda_netcdf_array_new(1, &size, basic_type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libcoda/coda-netcdf.c:472:21: note: referencing argument 2 of type 'long int[8]'
In file included from libcoda/coda-netcdf.c:32:
libcoda/coda-netcdf-internal.h:82:20: note: in a call to function 'coda_netcdf_array_new'
82 | coda_netcdf_array *coda_netcdf_array_new(int num_dims, long dim[CODA_MAX_NUM_DIMS], coda_netcdf_basic_type *base_type);
| ^~~~~~~~~~~~~~~~~~~~~
libcoda/coda-netcdf.c:472:21: warning: 'coda_netcdf_array_new' accessing 64 bytes in a region of size 8 [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overflow=-Wstringop-overflow=8;;]
472 | array = coda_netcdf_array_new(1, &size, basic_type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libcoda/coda-netcdf.c:472:21: note: referencing argument 2 of type 'long int[8]'
libcoda/coda-netcdf-internal.h:82:20: note: in a call to function 'coda_netcdf_array_new'
82 | coda_netcdf_array *coda_netcdf_array_new(int num_dims, long dim[CODA_MAX_NUM_DIMS], coda_netcdf_basic_type *base_type);
| ^~~~~~~~~~~~~~~~~~~~~
libcoda/coda-netcdf.c:472:21: warning: 'coda_netcdf_array_new' accessing 64 bytes in a region of size 8 [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overflow=-Wstringop-overflow=8;;]
472 | array = coda_netcdf_array_new(1, &size, basic_type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libcoda/coda-netcdf.c:472:21: note: referencing argument 2 of type 'long int[8]'
libcoda/coda-netcdf-internal.h:82:20: note: in a call to function 'coda_netcdf_array_new'
82 | coda_netcdf_array *coda_netcdf_array_new(int num_dims, long dim[CODA_MAX_NUM_DIMS], coda_netcdf_basic_type *base_type);
| ^~~~~~~~~~~~~~~~~~~~~
libcoda/coda-hdf4-cursor.c: In function 'read_partial_array':
libcoda/coda-hdf4-cursor.c:813:26: warning: 'start' may be used uninitialized [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmaybe-uninitialized-Wmaybe-uninitialized8;;]
813 | if (start[i] + edge[i] > type->dimsizes[i])
| ~~~~~^~~
libcoda/coda-hdf4-cursor.c:706:11: note: 'start' declared here
706 | int32 start[MAX_HDF4_VAR_DIMS];
| ^~~~~
libcoda/coda-hdf4-cursor.c:813:36: warning: 'edge' may be used uninitialized [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmaybe-uninitialized-Wmaybe-uninitialized8;;]
813 | if (start[i] + edge[i] > type->dimsizes[i])
| ~~~~^~~
libcoda/coda-hdf4-cursor.c:708:11: note: 'edge' declared here
708 | int32 edge[MAX_HDF4_VAR_DIMS];
| ^~~~
The following warnings look like potential memory corruption issues and should be fixed: