未验证 提交 98984cca 编写于 作者: A Aaron Robinson 提交者: GitHub

Fix non-standard modifers of printf in gc (#77627)

上级 46cc7472
......@@ -96,7 +96,7 @@ if(CLR_CMAKE_HOST_WIN32)
${STATIC_MT_VCRT_LIB}
kernel32.lib
advapi32.lib)
endif(CLR_CMAKE_HOST_WIN32)
endif(CLR_CMAKE_HOST_WIN32)
set (GC_LINK_LIBRARIES ${GC_LINK_LIBRARIES} gc_pal)
......@@ -109,11 +109,6 @@ add_dependencies(clrgc eventing_headers)
target_link_libraries(clrgc ${GC_LINK_LIBRARIES})
install_clr(TARGETS clrgc DESTINATIONS . COMPONENT runtime)
if(CLR_CMAKE_HOST_UNIX)
# dprintf causes many warnings (https://github.com/dotnet/runtime/issues/8737)
add_compile_options(-Wno-format)
endif(CLR_CMAKE_HOST_UNIX)
add_definitions(-DBUILD_AS_STANDALONE)
add_definitions(-DFX_VER_INTERNALNAME_STR=clrgc.dll)
add_definitions(-DVERIFY_HEAP)
......
此差异已折叠。
......@@ -157,7 +157,7 @@ void GCHeap::UpdatePostGCCounters()
FIRE_EVENT(GCEnd_V1, static_cast<uint32_t>(pSettings->gc_index), condemned_gen);
#ifdef SIMPLE_DPRINTF
dprintf (2, ("GC#%d: 0: %Id(%Id); 1: %Id(%Id); 2: %Id(%Id); 3: %Id(%Id)",
dprintf (2, ("GC#%zu: 0: %zu(%zu); 1: %zu(%zu); 2: %zu(%zu); 3: %zu(%zu)",
(size_t)pSettings->gc_index,
g_GenerationSizes[0], g_GenerationPromotedSizes[0],
g_GenerationSizes[1], g_GenerationPromotedSizes[1],
......
......@@ -3088,7 +3088,7 @@ protected:
void print()
{
dprintf (3, ("last plug: %Ix, last plug reloc: %Ix, before last: %Ix, b: %Ix",
dprintf (3, ("last plug: %p, last plug reloc: %zu, before last: %p, b: %zu",
last_plug, last_plug_relocation, before_last_plug, current_compacted_brick));
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册