summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2016-06-13 12:29:37 +0100
committerFrediano Ziglio <fziglio@redhat.com>2016-06-13 12:51:51 +0100
commit9b83e9a7c80e8bfba97e260faf1a2d66ddb903d7 (patch)
tree14529232a448946c5ab67252ed22561ceb519372 /src
parent3c8fb7e24da26d13bcc51ffcc4587feec8421473 (diff)
Remove some warnings compiling for Windows
GetLastError returns a DWORD which is a "unsigned long" on Windows so use "%lu" formatting instead of "%u". Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Marc-André Lureau <mlureau@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/controller/test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/controller/test.c b/src/controller/test.c
index 7c43f1b..783499c 100644
--- a/src/controller/test.c
+++ b/src/controller/test.c
@@ -49,7 +49,7 @@ void write_to_pipe (const void* data, size_t len)
#ifdef WIN32
DWORD written;
if (!WriteFile (pipe, data, len, &written, NULL) || written != len) {
- printf("Write to pipe failed %u\n", GetLastError());
+ printf("Write to pipe failed %lu\n", GetLastError());
}
#else
if (send (sock, data, len, 0) != len) {
@@ -107,7 +107,7 @@ ssize_t read_from_pipe (void* data, size_t size)
#ifdef WIN32
DWORD bytes;
if (!ReadFile (pipe, data, size, &bytes, NULL)) {
- printf ("Read from pipe failed %u\n", GetLastError());
+ printf ("Read from pipe failed %lu\n", GetLastError());
}
read = bytes;
#else
@@ -224,7 +224,7 @@ int main (int argc, char *argv[])
printf ("Creating Spice controller connection %s\n", pipe_name);
pipe = CreateFile (pipe_name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (pipe == INVALID_HANDLE_VALUE) {
- printf ("Could not open pipe %u\n", GetLastError());
+ printf ("Could not open pipe %lu\n", GetLastError());
return -1;
}
#else