Index: lib/Fuzzer/FuzzerLoop.cpp =================================================================== --- lib/Fuzzer/FuzzerLoop.cpp +++ lib/Fuzzer/FuzzerLoop.cpp @@ -263,7 +263,7 @@ } void Fuzzer::CrashCallback() { - Printf("==%d== ERROR: libFuzzer: deadly signal\n", GetPid()); + Printf("==%lu== ERROR: libFuzzer: deadly signal\n", GetPid()); if (EF->__sanitizer_print_stack_trace) EF->__sanitizer_print_stack_trace(); Printf("NOTE: libFuzzer has rudimentary signal handlers.\n" @@ -276,7 +276,7 @@ } void Fuzzer::InterruptCallback() { - Printf("==%d== libFuzzer: run interrupted; exiting\n", GetPid()); + Printf("==%lu== libFuzzer: run interrupted; exiting\n", GetPid()); PrintFinalStats(); _Exit(0); // Stop right now, don't perform any at-exit actions. } @@ -298,7 +298,7 @@ Printf(" and the timeout value is %d (use -timeout=N to change)\n", Options.UnitTimeoutSec); DumpCurrentUnit("timeout-"); - Printf("==%d== ERROR: libFuzzer: timeout after %d seconds\n", GetPid(), + Printf("==%lu== ERROR: libFuzzer: timeout after %d seconds\n", GetPid(), Seconds); if (EF->__sanitizer_print_stack_trace) EF->__sanitizer_print_stack_trace(); @@ -310,7 +310,7 @@ void Fuzzer::RssLimitCallback() { Printf( - "==%d== ERROR: libFuzzer: out-of-memory (used: %zdMb; limit: %zdMb)\n", + "==%lu== ERROR: libFuzzer: out-of-memory (used: %zdMb; limit: %zdMb)\n", GetPid(), GetPeakRSSMb(), Options.RssLimitMb); Printf(" To change the out-of-memory limit use -rss_limit_mb=\n\n"); if (EF->__sanitizer_print_memory_profile) Index: lib/Fuzzer/FuzzerUtil.h =================================================================== --- lib/Fuzzer/FuzzerUtil.h +++ lib/Fuzzer/FuzzerUtil.h @@ -47,7 +47,7 @@ void SleepSeconds(int Seconds); -int GetPid(); +unsigned long GetPid(); size_t GetPeakRSSMb(); Index: lib/Fuzzer/FuzzerUtilPosix.cpp =================================================================== --- lib/Fuzzer/FuzzerUtilPosix.cpp +++ lib/Fuzzer/FuzzerUtilPosix.cpp @@ -85,7 +85,7 @@ sleep(Seconds); // Use C API to avoid coverage from instrumented libc++. } -int GetPid() { return getpid(); } +unsigned long GetPid() { return (unsigned long)getpid(); } size_t GetPeakRSSMb() { struct rusage usage; Index: lib/Fuzzer/FuzzerUtilWindows.cpp =================================================================== --- lib/Fuzzer/FuzzerUtilWindows.cpp +++ lib/Fuzzer/FuzzerUtilWindows.cpp @@ -144,7 +144,7 @@ Sleep(Seconds * 1000); } -int GetPid() { return GetCurrentProcessId(); } +unsigned long GetPid() { return GetCurrentProcessId(); } size_t GetPeakRSSMb() { PROCESS_MEMORY_COUNTERS info;