windows: fix DWORD format string complaints
[fio.git] / os / windows / posix.c
index e36453e9e8c77d129e760fe31424cb8af88c57e6..9e9f12effbea9aaf738d159b4211ab617b3d2450 100644 (file)
@@ -168,7 +168,7 @@ int win_to_posix_error(DWORD winerr)
        case ERROR_FILE_INVALID:
                return ENXIO;
        default:
-               log_err("fio: windows error %d not handled\n", winerr);
+               log_err("fio: windows error %lu not handled\n", winerr);
                return EIO;
        }
 
@@ -188,7 +188,8 @@ int GetNumLogicalProcessors(void)
                if (error == ERROR_INSUFFICIENT_BUFFER)
                        processor_info = malloc(len);
                else {
-                       log_err("Error: GetLogicalProcessorInformation failed: %d\n", error);
+                       log_err("Error: GetLogicalProcessorInformation failed: %lu\n",
+                               error);
                        return -1;
                }
 
@@ -750,7 +751,7 @@ int setgid(gid_t gid)
 int nice(int incr)
 {
        DWORD prioclass = NORMAL_PRIORITY_CLASS;
-       
+
        if (incr < -15)
                prioclass = HIGH_PRIORITY_CLASS;
        else if (incr < 0)
@@ -759,7 +760,7 @@ int nice(int incr)
                prioclass = IDLE_PRIORITY_CLASS;
        else if (incr > 0)
                prioclass = BELOW_NORMAL_PRIORITY_CLASS;
-       
+
        if (!SetPriorityClass(GetCurrentProcess(), prioclass))
                log_err("fio: SetPriorityClass failed\n");
 
@@ -883,7 +884,7 @@ int poll(struct pollfd fds[], nfds_t nfds, int timeout)
        FD_ZERO(&exceptfds);
 
        for (i = 0; i < nfds; i++) {
-               if (fds[i].fd < 0) {
+               if (fds[i].fd == INVALID_SOCKET) {
                        fds[i].revents = 0;
                        continue;
                }
@@ -900,7 +901,7 @@ int poll(struct pollfd fds[], nfds_t nfds, int timeout)
 
        if (rc != SOCKET_ERROR) {
                for (i = 0; i < nfds; i++) {
-                       if (fds[i].fd < 0)
+                       if (fds[i].fd == INVALID_SOCKET)
                                continue;
 
                        if ((fds[i].events & POLLIN) && FD_ISSET(fds[i].fd, &readfds))