about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-04-22 17:10:30 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-04-22 17:10:30 +0000
commit498dbbd018df90f42a4e7db0c7fa35cde78ef66e (patch)
tree4fbbc19a3f33df01bc673e53272331479ecf8800
parent569df1dad3dabb0534059aa7d72e68ed1879127a (diff)
downloadrust-498dbbd018df90f42a4e7db0c7fa35cde78ef66e.tar.gz
rust-498dbbd018df90f42a4e7db0c7fa35cde78ef66e.zip
Fix warning in alloc_system.rs
-rw-r--r--example/alloc_system.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/example/alloc_system.rs b/example/alloc_system.rs
index e64daf96b01..441f3cd2987 100644
--- a/example/alloc_system.rs
+++ b/example/alloc_system.rs
@@ -80,7 +80,6 @@ mod platform {
     extern "system" {
         fn GetProcessHeap() -> HANDLE;
         fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
-        fn HeapReAlloc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID, dwBytes: SIZE_T) -> LPVOID;
         fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
         fn GetLastError() -> DWORD;
     }
@@ -111,7 +110,7 @@ mod platform {
             allocate_with_flags(layout, HEAP_ZERO_MEMORY)
         }
         #[inline]
-        unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
+        unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
             let header = get_header(ptr);
             let err = HeapFree(GetProcessHeap(), 0, header.0 as LPVOID);
             debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());