From 7beb242316d21e96d81014536ed7433c2ad104c8 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Sat, 27 Jul 2024 23:03:18 -0400 Subject: [PATCH] Fixed -Wsometimes-uninitialized warnings with zero initialization --- include/nctestserver.h | 2 +- libdispatch/dcopy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nctestserver.h b/include/nctestserver.h index 033d24e65..6df692c9e 100644 --- a/include/nctestserver.h +++ b/include/nctestserver.h @@ -42,7 +42,7 @@ static int timedping(const char* url, long timeout); static char** parseServers(const char* remotetestservers) { - char* rts; + char* rts = NULL; char** servers = NULL; char** list = NULL; char* p; diff --git a/libdispatch/dcopy.c b/libdispatch/dcopy.c index 111ce86a4..82acc353a 100644 --- a/libdispatch/dcopy.c +++ b/libdispatch/dcopy.c @@ -534,7 +534,7 @@ NC_copy_att(int ncid_in, int varid_in, const char *name, { /* Copy arbitrary attributes. */ int class; - size_t size; + size_t size = 0; nc_type xtype_out = NC_NAT; if(xtype <= NC_MAX_ATOMIC_TYPE) {