[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/2] build: fix output of pid values



On 02/11/2012 12:55 AM, Eric Blake wrote:
Nuke the last vestiges of printing pid_t values with the wrong
types, at least in code compiled on mingw64.  There may be other
places, but for now they are only compiled on systems where the
existing %d doesn't trigger gcc warnings.

* src/rpc/virnetsocket.c (virNetSocketNew): Use %lld and casting,
rather than assuming any particular int type for pid_t.
* src/util/command.c (virCommandRunAsync, virPidWait)
(virPidAbort): Likewise.
(verify): Drop a now stale assertion.
---
diff --git a/src/util/command.c b/src/util/command.c
index a2d5f84..b752b2a 100644
--- a/src/util/command.c
+++ b/src/util/command.c
@@ -50,9 +49,6 @@
      virReportErrorHelper(VIR_FROM_NONE, code, __FILE__,                 \
                           __FUNCTION__, __LINE__, __VA_ARGS__)

-/* We have quite a bit of changes to make if this doesn't hold.  */
-verify(sizeof(pid_t)<= sizeof(int));
-2011-07-12 10:42:41 -0600

Didn't hold that long actually :) (It was added 2011-07-12 10:42:41 -0600 )


ACK,

Peter


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]