From 974b7fe6dfa8935a2068365e416b8d886f9d2a32 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 30 Sep 2016 15:05:12 +0200 Subject: clang-cl loplugin: sal Change-Id: If04d3f07dc8bffac8887773b5424c09848cd8f1a Reviewed-on: https://gerrit.libreoffice.org/29404 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/rtl/alloc_arena.cxx | 6 +++--- sal/rtl/alloc_cache.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sal/rtl') diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index 654cd2f1dbfa..234a3d5c6755 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -1100,7 +1100,7 @@ SAL_CALL rtl_arena_free ( #if defined(SAL_UNX) #include #elif defined(SAL_W32) -#define MAP_FAILED 0 +#define MAP_FAILED nullptr #endif /* SAL_UNX || SAL_W32 */ namespace @@ -1144,7 +1144,7 @@ SAL_CALL rtl_machdep_alloc ( #if defined(SAL_UNX) addr = mmap (nullptr, (size_t)(size), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); #elif defined(SAL_W32) - addr = VirtualAlloc (NULL, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE); + addr = VirtualAlloc (nullptr, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE); #endif /* (SAL_UNX || SAL_W32) */ if (addr != MAP_FAILED) @@ -1177,7 +1177,7 @@ SAL_CALL rtl_machdep_free ( #if defined(SAL_UNX) (void) munmap(pAddr, nSize); #elif defined(SAL_W32) - (void) VirtualFree ((LPVOID)(pAddr), (SIZE_T)(0), MEM_RELEASE); + (void) VirtualFree (pAddr, (SIZE_T)(0), MEM_RELEASE); #endif /* (SAL_UNX || SAL_W32) */ } diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index 8540d913bba0..d91908879c70 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -1370,10 +1370,10 @@ rtl_cache_wsupdate_init() RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock)); g_cache_list.m_update_done = 0; - g_cache_list.m_update_cond = CreateEvent (0, TRUE, FALSE, 0); + g_cache_list.m_update_cond = CreateEvent (nullptr, TRUE, FALSE, nullptr); g_cache_list.m_update_thread = - CreateThread (NULL, 0, rtl_cache_wsupdate_all, (LPVOID)(10), 0, &dwThreadId); + CreateThread (nullptr, 0, rtl_cache_wsupdate_all, reinterpret_cast(10), 0, &dwThreadId); RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock)); } -- cgit