The UNIX and Linux Forums
>
Top Forums
>
High Level Programming
warning: int format,pid_t arg (arg 2)
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
warning: int format,pid_t arg (arg 2)
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
06-29-2009
mgessner
Registered User
Join Date: Oct 2007
Posts: 50
Because pid's differ widely across systems, the only thing you can really do (aside from changing printf() and adding a new class of object) is to cast intelligently:
Code:
printf ("pid = %lu\n", (unsigned long) getpid());
It's a reasonable assumption that a PID is an unsigned integer type.
HTH. YMMV.
mgessner
View Public Profile
Find all posts by mgessner
Find mgessner's past nominations received
Find mgessner's present nominations given