Skip to content

Commit

Permalink
Cast pid_t to int64_t for use in format specifiers
Browse files Browse the repository at this point in the history
Fix AIX warnings concerning incorrect format specifiers for
variables with type pid_t by casting them to int64_t since
pid_t is not guaranteed to be a long integer

Signed-off-by: Dylan Tuttle <jdylantuttle@gmail.com>
  • Loading branch information
dylanjtuttle committed Oct 10, 2023
1 parent 15a53fa commit 8d84408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/ras/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4949,8 +4949,8 @@ void TR_Debug::setupDebugger(void *addr)
char * Argv[20];

yield();
sprintf(cfname, "_%ld_", getpid());
sprintf(pp,"%ld", ppid);
sprintf(cfname, "_%ld_", (int64_t)getpid());
sprintf(pp, "%ld", (int64_t)ppid);
Argv[1] = "-a";
Argv[2] = pp;
Argv[3] = NULL;
Expand Down

0 comments on commit 8d84408

Please sign in to comment.