]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: silence a warning when building on sparc
authorWilly Tarreau <w@1wt.eu>
Sat, 7 Jan 2012 21:52:12 +0000 (22:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 7 Jan 2012 21:52:12 +0000 (22:52 +0100)
On Solaris/sparc, getpid() returns pid_t which is not an int :

  src/peers.c: In function `peer_io_handler':
  src/peers.c:508: warning: int format, pid_t arg (arg 6)

src/peers.c

index ac24e12ba4216e49132228ea2bb16c49290d1cd2..c6810e70406e1544fd8d84625a64f18c1aaa4889 100644 (file)
@@ -502,7 +502,7 @@ switchstate:
                                                PEER_SESSION_PROTO_NAME " 1.0\n%s\n%s %d\n%s %lu %d\n",
                                                ps->peer->id,
                                                localpeer,
-                                               getpid(),
+                                               (int)getpid(),
                                                ps->table->table->id,
                                                ps->table->table->type,
                                                (int)ps->table->table->key_size);