Skip to content

Commit ce93e45

Browse files
committed
Fix warnings
1 parent 15aa8f6 commit ce93e45

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/fiat/drhook/drhook.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,7 +2221,8 @@ process_options()
22212221
if(fp) fprintf(fp,"[EC_DRHOOK:hostname:myproc:omltid:pid:unixtid] [YYYYMMDD:HHMMSS:walltime] [function@file:lineno] -- Max OpenMP threads = %d\n",drhook_oml_get_max_threads());
22222222
OPTPRINT(fp,"%s %s [%s@%s:%d] DR_HOOK_SILENT=%d\n",pfx,TIMESTR(tid),FFL,opt_silent);
22232223

2224-
OPTPRINT(fp,"%s %s [%s@%s:%d] fp = %p\n",pfx,TIMESTR(tid),FFL,(void*)fp);
2224+
void* fp_alias = (void*)fp; // Pass alias to avoid warning "passing argument 1 to ‘restrict’-qualified parameter aliases with argument 8"
2225+
OPTPRINT(fp,"%s %s [%s@%s:%d] fp = %p\n",pfx,TIMESTR(tid),FFL,fp_alias);
22252226

22262227
env = getenv("ATP_ENABLED");
22272228
atp_enabled = env ? atoi(env) : 0;
@@ -2531,7 +2532,7 @@ process_options()
25312532
if (opt_nvtx_SWT < 0)
25322533
opt_nvtx_SWT = nvtx_SWT_default;
25332534

2534-
OPTPRINT(fp, "%s %s [%s@%s:%g] DR_HOOK_NVTX_SPAM_WT=%g\n", pfx, TIMESTR(tid), FFL, nvtx_SWT_default);
2535+
OPTPRINT(fp, "%s %s [%s@%s:%d] DR_HOOK_NVTX_SPAM_WT=%g\n", pfx, TIMESTR(tid), FFL, nvtx_SWT_default);
25352536
}
25362537
}
25372538

src/fiat/system/getcurheap.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,14 @@ resetmaxloc()
9393
}
9494

9595
void
96-
9796
setheapcheck_()
9897
{
9998
heapcheck=1;
10099
}
100+
101+
// Unused function, works around warning of unused heapcheck variable
102+
int
103+
getheapcheck_()
104+
{
105+
return heapcheck;
106+
}

0 commit comments

Comments
 (0)