From a18e7767f3ab7b310b9dc2e9181ea2bc50461748 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 25 Jan 2018 10:25:50 +0100 Subject: [PATCH] Fix some unreferenced local variable warnings --- gfx/common/d3d12_common.c | 4 ++-- gfx/drivers/d3d11.c | 1 - gfx/drivers/d3d12.c | 6 +++--- gfx/drivers/d3d9.c | 3 +-- gfx/drivers_font/d3d11_font.c | 3 +-- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/gfx/common/d3d12_common.c b/gfx/common/d3d12_common.c index abe3aec3c8..7ec2db3a4e 100644 --- a/gfx/common/d3d12_common.c +++ b/gfx/common/d3d12_common.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2014-2018 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms @@ -599,7 +599,7 @@ DXGI_FORMAT d3d12_get_closest_match( D3D12Device device, DXGI_FORMAT desired_format, D3D12_FORMAT_SUPPORT1 desired_format_support) { DXGI_FORMAT* format = dxgi_get_format_fallback_list(desired_format); - UINT format_support; + while (*format != DXGI_FORMAT_UNKNOWN) { D3D12_FEATURE_DATA_FORMAT_SUPPORT format_support = { *format }; diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index b7d3a33d97..869df71024 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -43,7 +43,6 @@ static void d3d11_set_filtering(void* data, unsigned index, bool smooth) static void d3d11_gfx_set_rotation(void* data, unsigned rotation) { math_matrix_4x4 rot; - math_matrix_4x4* mvp; d3d11_video_t* d3d11 = (d3d11_video_t*)data; if (!d3d11) diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index 16dde9ce33..608dc5a3bd 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -172,14 +172,14 @@ static bool d3d12_gfx_frame( if (d3d12->resize_chain) { - int i; + unsigned i; - for (int i = 0; i < countof(d3d12->chain.renderTargets); i++) + for (i = 0; i < countof(d3d12->chain.renderTargets); i++) Release(d3d12->chain.renderTargets[i]); DXGIResizeBuffers(d3d12->chain.handle, 0, 0, 0, 0, 0); - for (int i = 0; i < countof(d3d12->chain.renderTargets); i++) + for (i = 0; i < countof(d3d12->chain.renderTargets); i++) { DXGIGetSwapChainBuffer(d3d12->chain.handle, i, &d3d12->chain.renderTargets[i]); D3D12CreateRenderTargetView( diff --git a/gfx/drivers/d3d9.c b/gfx/drivers/d3d9.c index 7c59a52580..b4f337c595 100644 --- a/gfx/drivers/d3d9.c +++ b/gfx/drivers/d3d9.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2014 - OV2 @@ -722,7 +722,6 @@ static void d3d9_set_viewport(void *data, bool force_full, bool allow_rotate) { - D3DVIEWPORT9 viewport; int x = 0; int y = 0; d3d_video_t *d3d = (d3d_video_t*)data; diff --git a/gfx/drivers_font/d3d11_font.c b/gfx/drivers_font/d3d11_font.c index 0d49496485..558d396ddd 100644 --- a/gfx/drivers_font/d3d11_font.c +++ b/gfx/drivers_font/d3d11_font.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2014-2018 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms @@ -36,7 +36,6 @@ typedef struct static void* d3d11_font_init_font(void* data, const char* font_path, float font_size, bool is_threaded) { - uint32_t i; d3d11_video_t* d3d11 = (d3d11_video_t*)data; d3d11_font_t* font = (d3d11_font_t*)calloc(1, sizeof(*font));