From 15dba177f27142c781fbd845770598c8db9c8be7 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 26 Nov 2024 10:37:31 +0100 Subject: [PATCH] prevent `int-conversion` error from Intel compiler `icx` Error message: ``` $TSMP/models/CLM3.5/src/utils/timing/gptl.c:182:28: error: incompatible pointer to integer conversion assigning to 'unsigned int' from 'void *' [-Wint-conversion] current_depth[t].depth = NULL; ^ ~~~~ $TSMP/models/CLM3.5/src/utils/timing/gptl.c:183:22: error: incompatible pointer to integer conversion assigning to 'int' from 'void *' [-Wint-conversion] max_depth[t] = NULL; ^ ~~~~ $TSMP/models/CLM3.5/src/utils/timing/gptl.c:184:22: error: incompatible pointer to integer conversion assigning to 'int' from 'void *' [-Wint-conversion] max_name_len[t] = NULL; ^ ~~~~ 3 errors generated. ``` --- src/utils/timing/gptl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/timing/gptl.c b/src/utils/timing/gptl.c index ad3473f..533f1b1 100644 --- a/src/utils/timing/gptl.c +++ b/src/utils/timing/gptl.c @@ -179,9 +179,9 @@ int GPTLinitialize (void) for (t = 0; t < maxthreads; t++) { timers[t] = NULL; - current_depth[t].depth = NULL; - max_depth[t] = NULL; - max_name_len[t] = NULL; + current_depth[t].depth = 0; + max_depth[t] = 0; + max_name_len[t] = 0; hashtable[t] = (Hashentry *) GPTLallocate (tablesize * sizeof (Hashentry)); #ifdef DIAG novfl[t] = NULL;