From 0e5fbbb9e1f6c1a3e5ffce16437749477f7f6e11 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 29 Dec 2018 02:12:50 +0100 Subject: [PATCH] Silence some warnings --- gfx/common/d3d12_common.c | 10 +++------- gfx/common/d3d12_common.h | 2 +- menu/menu_driver.c | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gfx/common/d3d12_common.c b/gfx/common/d3d12_common.c index 0f060231e0..e328af6a1b 100644 --- a/gfx/common/d3d12_common.c +++ b/gfx/common/d3d12_common.c @@ -215,13 +215,8 @@ bool d3d12_init_queue(d3d12_video_t* d3d12) return true; } -#ifdef __WINRT__ bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, void* corewindow) -#else -bool d3d12_init_swapchain(d3d12_video_t* d3d12, - int width, int height, HWND hwnd) -#endif { unsigned i; #ifdef __WINRT__ @@ -229,6 +224,7 @@ bool d3d12_init_swapchain(d3d12_video_t* d3d12, memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC1)); #else DXGI_SWAP_CHAIN_DESC desc; + HWND hwnd = (HWND)corewindow; memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC)); #endif @@ -324,7 +320,7 @@ static D3D12_CPU_DESCRIPTOR_HANDLE d3d12_descriptor_heap_slot_alloc(d3d12_descri static void d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIPTOR_HANDLE handle) { - int i; + unsigned i; if (!handle.ptr) return; @@ -336,7 +332,7 @@ d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIP assert(heap->map[i]); heap->map[i] = false; - if (heap->start > i) + if (heap->start > (int)i) heap->start = i; } diff --git a/gfx/common/d3d12_common.h b/gfx/common/d3d12_common.h index 08b13bf2d8..5d4e221a3d 100644 --- a/gfx/common/d3d12_common.h +++ b/gfx/common/d3d12_common.h @@ -1505,7 +1505,7 @@ bool d3d12_init_pipeline( D3D12_GRAPHICS_PIPELINE_STATE_DESC* desc, D3D12PipelineState* out); -bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, HWND hwnd); +bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, void *corewindow); bool d3d12_init_queue(d3d12_video_t* d3d12); diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 579e499ef9..4750fe1ec2 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -2665,7 +2665,7 @@ void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha) void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_displaylist_info_t *info) { - int i = 0; + unsigned i = 0; if (subsystem && subsystem_current_count > 0) { for (i = 0; i < subsystem_current_count; i++, subsystem++)