Re: [PATCH usbclerk 5/6] Fix a lot of gcc warnings

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

 



On 02/19/2013 12:35 PM, Marc-André Lureau wrote:
---
  Makefile.am      |  4 ++--
  usbclerk.cpp     | 59 ++++++++++++++++++++++++++++----------------------------
  usbclerktest.cpp | 16 +++++++--------
  vdlog.cpp        |  2 +-
  vdlog.h          |  2 +-
  5 files changed, 42 insertions(+), 41 deletions(-)


@@ -650,10 +650,10 @@ bool USBClerk::get_dev_props(HDEVINFO devs, SP_DEVINFO_DATA *dev_info,
      *cls = *subcls = *proto = 0;
      if (!SetupDiGetDeviceRegistryProperty(devs, dev_info, SPDRP_COMPATIBLEIDS, NULL,
              (PBYTE)compat_ids, sizeof(compat_ids), NULL)) {
-        vd_printf("Cannot get compatible id %u", GetLastError());
+        vd_printf("Cannot get compatible id %ld", GetLastError());
          return false;
      }


Hi Marc-Andre,

GetLastError() [1] returns DWORD [2]  which is a 32 bit unsigned integer.
But in windef.h (which comes with mingw-headers) it is defined as unsigned long.

I'm not sure what to do with it. I guess it's ok, if it does not break the Visual Studio build.

[1] http://msdn.microsoft.com/en-us/library/ms679360%28VS.85%29.aspx
[2] http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx


nitpick: would be nice if we are consistent and use "%lu".
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]