Uses %Ix instead of %x
Fixes compiler warning about implicit type conversion on 64 bit machine
This commit is contained in:
@@ -70,7 +70,10 @@ ssize_t sendall(SOCKET sock, const void *buffer, size_t size)
|
|||||||
* size_t to ssize_t (or int), which have both the same width! */
|
* size_t to ssize_t (or int), which have both the same width! */
|
||||||
for (sent = 0; sent < size; sent += r) {
|
for (sent = 0; sent < size; sent += r) {
|
||||||
r = send(sock, (void *) (((unsigned char *) buffer)+sent),
|
r = send(sock, (void *) (((unsigned char *) buffer)+sent),
|
||||||
((int) size)-sent, MSG_NOSIGNAL);
|
#ifdef _WIN32
|
||||||
|
(int)
|
||||||
|
#endif
|
||||||
|
(size-sent), MSG_NOSIGNAL);
|
||||||
|
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ DWORD PipeReader::startServer() {
|
|||||||
swprintf(temp,L"\\\\.\\pipe\\%s",pipeEventName);
|
swprintf(temp,L"\\\\.\\pipe\\%s",pipeEventName);
|
||||||
HANDLE _eventpipe=CreateNamedPipe(temp,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,PIPE_UNLIMITED_INSTANCES,0,0,0,&sa);
|
HANDLE _eventpipe=CreateNamedPipe(temp,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,PIPE_UNLIMITED_INSTANCES,0,0,0,&sa);
|
||||||
wchar_t log[300];
|
wchar_t log[300];
|
||||||
swprintf(log,L"[BixVReader]Pipe created:%s:%08x",pipeName,_pipe);
|
swprintf(log,L"[BixVReader]Pipe created:%s:%08Ix",pipeName,_pipe);
|
||||||
OutputDebugString(log);
|
OutputDebugString(log);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ SectionLocker::SectionLocker(CRITICAL_SECTION &critsection,char *function,int li
|
|||||||
if (TryEnterCriticalSection(section)==0) {
|
if (TryEnterCriticalSection(section)==0) {
|
||||||
OutputDebugStringA("[BixVReader]RACE!");
|
OutputDebugStringA("[BixVReader]RACE!");
|
||||||
char logBuffer[500];
|
char logBuffer[500];
|
||||||
sprintf(logBuffer,"[BixVReader]Richiesto da:Function:%s,Line:%i,Object:%x,Lock:%x",Function,Line,Object,section);
|
sprintf(logBuffer,"[BixVReader]Richiesto da:Function:%s,Line:%i,Object:%Ix,Lock:%Ix",Function,Line,Object,section);
|
||||||
OutputDebugStringA(logBuffer);
|
OutputDebugStringA(logBuffer);
|
||||||
ShowMe=section;
|
ShowMe=section;
|
||||||
EnterCriticalSection(section);
|
EnterCriticalSection(section);
|
||||||
@@ -23,7 +23,7 @@ SectionLocker::SectionLocker(CRITICAL_SECTION &critsection,char *function,int li
|
|||||||
SectionLocker::~SectionLocker() {
|
SectionLocker::~SectionLocker() {
|
||||||
if (section==ShowMe) {
|
if (section==ShowMe) {
|
||||||
char logBuffer[500];
|
char logBuffer[500];
|
||||||
sprintf(logBuffer,"[BixVReader]Posseduto da:Function:%s,Line:%i,Object:%x,Lock:%x",Function,Line,Object,section);
|
sprintf(logBuffer,"[BixVReader]Posseduto da:Function:%s,Line:%i,Object:%Ix,Lock:%Ix",Function,Line,Object,section);
|
||||||
OutputDebugStringA(logBuffer);
|
OutputDebugStringA(logBuffer);
|
||||||
ShowMe=NULL;
|
ShowMe=NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user