Author: Martin Storsjö Date: 2025-07-29T09:54:48+02:00 New Revision: 67cec1afdbc2fde0765fd27b5d039fa5823e5a69
URL: https://github.com/llvm/llvm-project/commit/67cec1afdbc2fde0765fd27b5d039fa5823e5a69 DIFF: https://github.com/llvm/llvm-project/commit/67cec1afdbc2fde0765fd27b5d039fa5823e5a69.diff LOG: [lldb] [Windows] Silence format string warnings (#150886) This fixes the following build warnings in a mingw environment: ../../lldb/source/Host/windows/MainLoopWindows.cpp:226:50: warning: format specifies type 'int' but the argument has type 'IOObject::WaitableHandle' (aka 'void *') [-Wformat] 226 | "File descriptor %d already monitored.", waitable_handle); | ~~ ^~~~~~~~~~~~~~~ ../../lldb/source/Host/windows/MainLoopWindows.cpp:239:49: warning: format specifies type 'int' but the argument has type 'DWORD' (aka 'unsigned long') [-Wformat] 238 | error = Status::FromErrorStringWithFormat("Unsupported file type %d", | ~~ | %lu 239 | file_type); | ^~~~~~~~~ 2 warnings generated. (cherry picked from commit 98ec927fcb8697a6f6df64298835917aa1d0d3c1) Added: Modified: lldb/source/Host/windows/MainLoopWindows.cpp Removed: ################################################################################ diff --git a/lldb/source/Host/windows/MainLoopWindows.cpp b/lldb/source/Host/windows/MainLoopWindows.cpp index c1a018238432d..c0b10797e506a 100644 --- a/lldb/source/Host/windows/MainLoopWindows.cpp +++ b/lldb/source/Host/windows/MainLoopWindows.cpp @@ -223,7 +223,7 @@ MainLoopWindows::RegisterReadObject(const IOObjectSP &object_sp, if (m_read_fds.find(waitable_handle) != m_read_fds.end()) { error = Status::FromErrorStringWithFormat( - "File descriptor %d already monitored.", waitable_handle); + "File descriptor %p already monitored.", waitable_handle); return nullptr; } @@ -235,7 +235,7 @@ MainLoopWindows::RegisterReadObject(const IOObjectSP &object_sp, } else { DWORD file_type = GetFileType(waitable_handle); if (file_type != FILE_TYPE_PIPE) { - error = Status::FromErrorStringWithFormat("Unsupported file type %d", + error = Status::FromErrorStringWithFormat("Unsupported file type %ld", file_type); return nullptr; } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits