Index: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp @@ -265,7 +265,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" @@ -278,7 +278,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. } @@ -300,7 +300,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(); @@ -312,7 +312,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: llvm/trunk/lib/Fuzzer/FuzzerUtil.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtil.h +++ llvm/trunk/lib/Fuzzer/FuzzerUtil.h @@ -47,7 +47,7 @@ void SleepSeconds(int Seconds); -int GetPid(); +unsigned long GetPid(); size_t GetPeakRSSMb(); Index: llvm/trunk/lib/Fuzzer/FuzzerUtilPosix.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtilPosix.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerUtilPosix.cpp @@ -87,7 +87,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: llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp @@ -140,7 +140,7 @@ void SleepSeconds(int Seconds) { Sleep(Seconds * 1000); } -int GetPid() { return GetCurrentProcessId(); } +unsigned long GetPid() { return GetCurrentProcessId(); } size_t GetPeakRSSMb() { PROCESS_MEMORY_COUNTERS info;