summaryrefslogtreecommitdiffstats
path: root/src/H5trace.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-06-13 16:33:35 (GMT)
committerGitHub <noreply@github.com>2023-06-13 16:33:35 (GMT)
commit4462f730585558532b38f14404333fdeb0033335 (patch)
tree3a7e6613a57aab1acaeec5724da61f7aba15629b /src/H5trace.c
parentd4605919f970e2f84d00d802f1b01db1b98fafc6 (diff)
downloadhdf5-4462f730585558532b38f14404333fdeb0033335.zip
hdf5-4462f730585558532b38f14404333fdeb0033335.tar.gz
hdf5-4462f730585558532b38f14404333fdeb0033335.tar.bz2
clang-tidy clang-analyzer-core issues addressed (#3113)
src/H5system.c:1293:13: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] src/H5trace.c:4048:17: warning: Passed-by-value struct argument contains uninitialized data (e.g., via the field chain: 'initial.user') [clang-analyzer-core.CallAndMessage]
Diffstat (limited to 'src/H5trace.c')
-rw-r--r--src/H5trace.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/H5trace.c b/src/H5trace.c
index 2cf40d8..521bd30 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -281,8 +281,6 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
argname = HDva_arg(ap, char *);
if (argname)
H5RS_asprintf_cat(rs, "%s%s=", argno ? ", " : "", argname);
- else
- argname = "";
/* A pointer/array */
if (ptr) {
@@ -3984,8 +3982,8 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
hssize_t i;
FILE *out = H5_debug_g.trace;
static hbool_t is_first_invocation = TRUE;
- H5_timer_t function_timer;
- H5_timevals_t function_times = {0.0, 0.0, 0.0};
+ H5_timer_t function_timer = {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, FALSE};
+ H5_timevals_t function_times = {0.0, 0.0, 0.0};
static H5_timer_t running_timer;
H5_timevals_t running_times;
static int current_depth = 0;