Windows: Fixed warnings in `windows/os.hpp`. Captured the result of `Process32First` via its return type `BOOL` rather than implicitly casting to `bool`.
Review: https://reviews.apache.org/r/52063/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a5993cec Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a5993cec Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a5993cec Branch: refs/heads/master Commit: a5993cec547f299a8edff7662599c68e208ecdac Parents: 4a91c1e Author: Daniel Pravat <dpra...@outlook.com> Authored: Mon Sep 19 14:51:12 2016 -0700 Committer: Joseph Wu <josep...@apache.org> Committed: Mon Sep 19 15:14:18 2016 -0700 ---------------------------------------------------------------------- 3rdparty/stout/include/stout/windows/os.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/a5993cec/3rdparty/stout/include/stout/windows/os.hpp ---------------------------------------------------------------------- diff --git a/3rdparty/stout/include/stout/windows/os.hpp b/3rdparty/stout/include/stout/windows/os.hpp index da458fb..fb34134 100644 --- a/3rdparty/stout/include/stout/windows/os.hpp +++ b/3rdparty/stout/include/stout/windows/os.hpp @@ -543,8 +543,8 @@ inline Result<PROCESSENTRY32> process_entry(pid_t pid) // Get first process so that we can loop through process entries until we // find the one we care about. SetLastError(ERROR_SUCCESS); - bool has_next = Process32First(safe_snapshot_handle.get(), &process_entry); - if (!has_next) { + BOOL has_next = Process32First(safe_snapshot_handle.get(), &process_entry); + if (has_next == FALSE) { // No first process was found. We should never be here; it is arguable we // should return `None`, since we won't find the PID we're looking for, but // we elect to return `Error` because something terrible has probably @@ -557,14 +557,14 @@ inline Result<PROCESSENTRY32> process_entry(pid_t pid) } // Loop through processes until we find the one we're looking for. - while (has_next) { + while (has_next == TRUE) { if (process_entry.th32ProcessID == pid) { // Process found. return process_entry; } has_next = Process32Next(safe_snapshot_handle.get(), &process_entry); - if (!has_next) { + if (has_next == FALSE) { DWORD last_error = GetLastError(); if (last_error != ERROR_NO_MORE_FILES && last_error != ERROR_SUCCESS) { return WindowsError(