5066
|
1 This file is part of MXE. See LICENSE.md for licensing information. |
|
2 |
|
3 Contains ad hoc patches for cross building. |
|
4 |
|
5 From 808089f334f44ea125ec5263fb85c0f2c95fd190 Mon Sep 17 00:00:00 2001 |
|
6 From: MXE |
|
7 Date: Sat, 6 Jun 2015 06:16:19 -0700 |
|
8 Subject: [PATCH] Do not cast pointer to integer types. Instead, pass them in |
|
9 as-is. |
|
10 |
|
11 |
|
12 diff --git a/dcmnet/libsrc/dul.cc b/dcmnet/libsrc/dul.cc |
|
13 index 48a267b..3a5eb18 100644 |
|
14 --- a/dcmnet/libsrc/dul.cc |
|
15 +++ b/dcmnet/libsrc/dul.cc |
|
16 @@ -1770,7 +1770,7 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, |
|
17 // send number of socket handle in child process over anonymous pipe |
|
18 DWORD bytesWritten; |
|
19 char buf[20]; |
|
20 - sprintf(buf, "%i", OFreinterpret_cast(int, childSocketHandle)); |
|
21 + sprintf(buf, "%p", childSocketHandle); |
|
22 if (!WriteFile(hChildStdInWriteDup, buf, strlen(buf) + 1, &bytesWritten, NULL)) |
|
23 { |
|
24 CloseHandle(hChildStdInWriteDup); |
|
25 @@ -1780,7 +1780,7 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, |
|
26 // return OF_ok status code DULC_FORKEDCHILD with descriptive text |
|
27 OFOStringStream stream; |
|
28 stream << "New child process started with pid " << OFstatic_cast(int, pi.dwProcessId) |
|
29 - << ", socketHandle " << OFreinterpret_cast(int, childSocketHandle) << OFStringStream_ends; |
|
30 + << ", socketHandle " << childSocketHandle << OFStringStream_ends; |
|
31 OFSTRINGSTREAM_GETOFSTRING(stream, msg) |
|
32 return makeDcmnetCondition(DULC_FORKEDCHILD, OF_ok, msg.c_str()); |
|
33 } |
|
34 -- |
|
35 2.1.4 |
|
36 |