Skip to content

Commit

Permalink
Fix -Wformat=
Browse files Browse the repository at this point in the history
```
warning: format ‘%lX’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘intptr_t {aka int}’ [-Wformat=]
```
  • Loading branch information
fjeremic committed Jun 7, 2021
1 parent 82622ed commit e2ebd2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/control/CompileMethod.cpp
Expand Up @@ -98,7 +98,7 @@ writePerfToolEntry(void *start, uint32_t size, const char *name)

// j9jit_fprintf(getPerfFile(), "%lX %lX %s_%s\n", (intptr_t) getMetadata()->startPC, getMetadata()->endWarmPC - getMetadata()->startPC,
// getCompilation()->signature(), getCompilation()->getHotnessName(getCompilation()->getMethodHotness()));
fprintf(perfFile, "%lX %lX %s\n", (intptr_t) start, (intptr_t) size, name);
fprintf(perfFile, "%" OMR_PRIdPTR " %" OMR_PRIdPTR " %s\n", (intptr_t) start, (intptr_t) size, name);

// If there is a cold section, add another line
// if (getMetadata()->startColdPC)
Expand Down
2 changes: 1 addition & 1 deletion compiler/ras/CallStack.cpp
Expand Up @@ -207,7 +207,7 @@ void TR_LinuxCallStackIterator::printSymbol(int32_t frame, char *sig, TR::Compil
intptr_t offset;
intptr_t address;

int rc = sscanf(sig, "%255[^(](%255[^+]+%lx) [%lx]", lib, func, &offset, &address);
int rc = sscanf(sig, "%255[^(](%255[^+]+%" OMR_PRIdPTR ") [%" OMR_PRIdPTR "]", lib, func, &offset, &address);
if (rc == 4)
{
char *funcToPrint = func;
Expand Down

0 comments on commit e2ebd2e

Please sign in to comment.