Skip to contentSkip to conversation

Win32: Fix warnings

PATCH In review Hervé Poussineau 2 participants 2 messages Oct 19, 2008 – Oct 21, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Win32: Fix warnings

Hi,

Attached patch fixes some warnings which only happen on Windows.

Hervé

bt-host.c +1 -1
Index: bt-host.c
===================================================================
@@ -200,7 +200,7 @@
 #else
 struct HCIInfo *bt_host_hci(const char *id)
 {
-    fprintf(stderr, "qemu: bluetooth passthrough not supported (yet)\n", errno);
+    fprintf(stderr, "qemu: bluetooth passthrough not supported (yet)\n");
 
     return 0;
 }
exec.c +0 -1
Index: exec.c
===================================================================
@@ -233,7 +233,6 @@
 #ifdef _WIN32
     {
         SYSTEM_INFO system_info;
-        DWORD old_protect;
 
         GetSystemInfo(&system_info);
         qemu_real_host_page_size = system_info.dwPageSize;
tap-win32.c +3 -3
Index: tap-win32.c
===================================================================
@@ -77,7 +77,7 @@
 // Compile time configuration
 //======================
 
-//#define DEBUG_TAP_WIN32 1
+//#define DEBUG_TAP_WIN32
 
 #define TUN_ASYNCHRONOUS_WRITES 1
 
@@ -509,7 +509,7 @@
                 result = GetOverlappedResult( overlapped->handle, &overlapped->read_overlapped,
                                               &read_size, FALSE);
                 if (!result) {
-#if DEBUG_TAP_WIN32
+#ifdef DEBUG_TAP_WIN32
                     LPVOID lpBuffer;
                     dwError = GetLastError();
                     FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
@@ -520,7 +520,7 @@
 #endif
                 }
             } else {
-#if DEBUG_TAP_WIN32
+#ifdef DEBUG_TAP_WIN32
                 LPVOID lpBuffer;
                 FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                                NULL, dwError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
#1 lore raw
Quoted 3 lines · Hervé Poussineau

Hi,

Attached patch fixes some warnings which only happen on Windows.

Please include a Signed-off-by

Regards,

Anthony Liguori

Quoted 1 line

Hervé