]> err.no Git - yubikey-personalization/commitdiff
MSVC2010 Error Fixes
authorJosh Klontz <jklontz@mitre.org>
Tue, 17 Jul 2012 21:45:04 +0000 (17:45 -0400)
committerJosh Klontz <jklontz@mitre.org>
Tue, 17 Jul 2012 21:45:04 +0000 (17:45 -0400)
ykcore/ykcore.c
ykcore/ykcore_windows.c

index 9427732e1df93495ee712aee298dd98f81d86fc2..74ea1fb480eeec2fc206a65c3198ec4475eb7873 100644 (file)
@@ -486,7 +486,7 @@ int yk_read_response_from_key(YK_KEY *yk, uint8_t slot, unsigned int flags,
        /* The first part of the response was read by yk_wait_for_key_status(). We need
         * to copy it to buf.
         */
-       memcpy(buf + *bytes_read, data, sizeof(data) - 1);
+       memcpy((char*)buf + *bytes_read, data, sizeof(data) - 1);
        *bytes_read += sizeof(data) - 1;
 
        while (*bytes_read + FEATURE_RPT_SIZE <= bufsize) {
@@ -517,7 +517,7 @@ int yk_read_response_from_key(YK_KEY *yk, uint8_t slot, unsigned int flags,
                                return 1;
                        }
 
-                       memcpy(buf + *bytes_read, data, sizeof(data) - 1);
+                       memcpy((char*)buf + *bytes_read, data, sizeof(data) - 1);
                        *bytes_read += sizeof(data) - 1;
                } else {
                        /* Reset read mode of Yubikey before returning. */
index 796ce37f96ed341ba320297d2b5504dcde44bef6..b08590f79cb78bc067ac66d1896b917fcc0303f9 100644 (file)
@@ -32,6 +32,7 @@
 #include "ykdef.h"
 #include "ykcore_backend.h"
 
+#define INITGUID
 #include <stdio.h>
 #include <windows.h>
 #include <setupapi.h>