Skip to content

Commit d72690b

Browse files
committed
clang-20 found possibly uninitialized variables
1 parent f199cc9 commit d72690b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

darshan-util/darshan-hdf5-logutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static int darshan_log_get_hdf5_dataset(darshan_fd fd, void** hdf5_buf_p)
219219
struct darshan_hdf5_dataset *ds = *((struct darshan_hdf5_dataset **)hdf5_buf_p);
220220
int rec_len;
221221
int i;
222-
int ret;
222+
int ret=0;
223223

224224
if(fd->mod_map[DARSHAN_H5D_MOD].len == 0)
225225
return(0);

darshan-util/darshan-pnetcdf-logutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static int darshan_log_get_pnetcdf_var(darshan_fd fd, void** pnetcdf_buf_p)
253253
struct darshan_pnetcdf_var *var = *((struct darshan_pnetcdf_var **)pnetcdf_buf_p);
254254
int rec_len;
255255
int i;
256-
int ret;
256+
int ret=0;
257257

258258
if(fd->mod_map[DARSHAN_PNETCDF_VAR_MOD].len == 0)
259259
return(0);

darshan-util/darshan-stdio-logutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int darshan_log_get_stdio_record(darshan_fd fd, void** stdio_buf_p)
142142
struct darshan_stdio_file *file = *((struct darshan_stdio_file **)stdio_buf_p);
143143
int rec_len;
144144
int i;
145-
int ret;
145+
int ret=0;
146146

147147
if(fd->mod_map[DARSHAN_STDIO_MOD].len == 0)
148148
return(0);

0 commit comments

Comments
 (0)