Skip to content

Commit

Permalink
prevent int-conversion error from Intel compiler icx
Browse files Browse the repository at this point in the history
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.
```
  • Loading branch information
jjokella committed Nov 26, 2024
1 parent 6301079 commit 15dba17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/timing/gptl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 15dba17

Please sign in to comment.