mirror of
https://github.com/libretro/RetroArch
synced 2024-07-03 08:48:42 +00:00
(MSVC) silence warnings
This commit is contained in:
parent
217656454c
commit
6624126885
|
@ -2507,7 +2507,7 @@ static void video_driver_default_settings(global_t *global)
|
|||
**/
|
||||
void config_set_defaults(void *data)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
#ifdef HAVE_MENU
|
||||
static bool first_initialized = true;
|
||||
#endif
|
||||
|
|
|
@ -1387,7 +1387,7 @@ static bool vulkan_find_device_extensions(VkPhysicalDevice gpu,
|
|||
goto end;
|
||||
}
|
||||
|
||||
memcpy(enabled + count, exts, num_exts * sizeof(*exts));
|
||||
memcpy((void*)(enabled + count), exts, num_exts * sizeof(*exts));
|
||||
count += num_exts;
|
||||
|
||||
for (i = 0; i < num_optional_exts; i++)
|
||||
|
@ -1491,7 +1491,7 @@ static VkDevice vulkan_context_create_device_wrapper(
|
|||
ARRAY_SIZE(vulkan_device_extensions) +
|
||||
ARRAY_SIZE(vulkan_optional_device_extensions)) * sizeof(const char *));
|
||||
|
||||
memcpy(device_extensions, info.ppEnabledExtensionNames, info.enabledExtensionCount * sizeof(const char *));
|
||||
memcpy((void*)device_extensions, info.ppEnabledExtensionNames, info.enabledExtensionCount * sizeof(const char *));
|
||||
info.ppEnabledExtensionNames = device_extensions;
|
||||
|
||||
if (!(vulkan_find_device_extensions(gpu,
|
||||
|
@ -1513,7 +1513,7 @@ static VkDevice vulkan_context_create_device_wrapper(
|
|||
}
|
||||
|
||||
end:
|
||||
free(device_extensions);
|
||||
free((void*)device_extensions);
|
||||
return device;
|
||||
}
|
||||
|
||||
|
@ -1797,8 +1797,8 @@ static VkInstance vulkan_context_create_instance_wrapper(void *opaque, const VkI
|
|||
instance_extensions = (const char **)malloc((info.enabledExtensionCount + 3) * sizeof(const char *));
|
||||
instance_layers = (const char **)malloc((info.enabledLayerCount + 1) * sizeof(const char *));
|
||||
|
||||
memcpy(instance_extensions, info.ppEnabledExtensionNames, info.enabledExtensionCount * sizeof(const char *));
|
||||
memcpy(instance_layers, info.ppEnabledLayerNames, info.enabledLayerCount * sizeof(const char *));
|
||||
memcpy((void*)instance_extensions, info.ppEnabledExtensionNames, info.enabledExtensionCount * sizeof(const char *));
|
||||
memcpy((void*)instance_layers, info.ppEnabledLayerNames, info.enabledLayerCount * sizeof(const char *));
|
||||
info.ppEnabledExtensionNames = instance_extensions;
|
||||
info.ppEnabledLayerNames = instance_layers;
|
||||
|
||||
|
@ -1883,8 +1883,8 @@ static VkInstance vulkan_context_create_instance_wrapper(void *opaque, const VkI
|
|||
}
|
||||
|
||||
end:
|
||||
free(instance_extensions);
|
||||
free(instance_layers);
|
||||
free((void*)instance_extensions);
|
||||
free((void*)instance_layers);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ static void d3d10_clear_scissor(d3d10_video_t *d3d10, unsigned width, unsigned h
|
|||
#ifdef HAVE_OVERLAY
|
||||
static void d3d10_free_overlays(d3d10_video_t* d3d10)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < (unsigned)d3d10->overlays.count; i++)
|
||||
d3d10_release_texture(&d3d10->overlays.textures[i]);
|
||||
|
||||
|
@ -146,7 +146,7 @@ static void d3d10_overlay_set_alpha(void* data, unsigned index, float mod)
|
|||
|
||||
static bool d3d10_overlay_load(void* data, const void* image_data, unsigned num_images)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
D3D10_BUFFER_DESC desc;
|
||||
d3d10_sprite_t* sprites = NULL;
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)data;
|
||||
|
@ -346,7 +346,7 @@ static void d3d10_update_viewport(d3d10_video_t *d3d10, bool force_full)
|
|||
|
||||
static void d3d10_free_shader_preset(d3d10_video_t* d3d10)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if (!d3d10->shader_preset)
|
||||
return;
|
||||
|
||||
|
@ -1170,7 +1170,7 @@ static void d3d10_init_history(d3d10_video_t* d3d10,
|
|||
static void d3d10_init_render_targets(d3d10_video_t* d3d10,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < d3d10->shader_preset->passes; i++)
|
||||
{
|
||||
struct video_shader_pass* pass = &d3d10->shader_preset->pass[i];
|
||||
|
|
|
@ -109,7 +109,7 @@ static void d3d12_gfx_sync(d3d12_video_t* d3d12)
|
|||
#ifdef HAVE_OVERLAY
|
||||
static void d3d12_free_overlays(d3d12_video_t* d3d12)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < (unsigned)d3d12->overlays.count; i++)
|
||||
d3d12_release_texture(&d3d12->overlays.textures[i]);
|
||||
|
||||
|
@ -188,7 +188,7 @@ static void d3d12_overlay_set_alpha(void* data, unsigned index, float mod)
|
|||
|
||||
static bool d3d12_overlay_load(void* data, const void* image_data, unsigned num_images)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
D3D12_RANGE range;
|
||||
d3d12_sprite_t* sprites = NULL;
|
||||
d3d12_video_t* d3d12 = (d3d12_video_t*)data;
|
||||
|
@ -288,7 +288,7 @@ static void d3d12_get_overlay_interface(void* data, const video_overlay_interfac
|
|||
|
||||
static void d3d12_render_overlay(d3d12_video_t *d3d12)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
if (d3d12->flags & D3D12_ST_FLAG_OVERLAYS_FULLSCREEN)
|
||||
{
|
||||
|
@ -510,7 +510,7 @@ static void d3d12_update_viewport(d3d12_video_t *d3d12, bool force_full)
|
|||
|
||||
static void d3d12_free_shader_preset(d3d12_video_t* d3d12)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if (!d3d12->shader_preset)
|
||||
return;
|
||||
|
||||
|
@ -611,7 +611,7 @@ static void d3d12_init_pipeline(
|
|||
static bool d3d12_gfx_set_shader(void* data, enum rarch_shader_type type, const char* path)
|
||||
{
|
||||
#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS)
|
||||
int i;
|
||||
size_t i;
|
||||
d3d12_texture_t* source = NULL;
|
||||
d3d12_video_t* d3d12 = (d3d12_video_t*)data;
|
||||
|
||||
|
@ -1962,7 +1962,7 @@ error:
|
|||
|
||||
static void d3d12_init_history(d3d12_video_t* d3d12, unsigned width, unsigned height)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
/* TODO/FIXME: should we init history to max_width/max_height instead ?
|
||||
* to prevent out of memory errors happening several frames later
|
||||
* and to reduce memory fragmentation */
|
||||
|
@ -1982,7 +1982,7 @@ static void d3d12_init_history(d3d12_video_t* d3d12, unsigned width, unsigned he
|
|||
|
||||
static void d3d12_init_render_targets(d3d12_video_t* d3d12, unsigned width, unsigned height)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < d3d12->shader_preset->passes; i++)
|
||||
{
|
||||
struct video_shader_pass* pass = &d3d12->shader_preset->pass[i];
|
||||
|
|
|
@ -465,7 +465,7 @@ static void d3d9_hlsl_deinit_progs(hlsl_renderchain_t *chain)
|
|||
{
|
||||
if (chain->chain.passes->count >= 1)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
d3d9_vertex_buffer_free(NULL,
|
||||
chain->chain.passes->data[0].vertex_decl);
|
||||
|
@ -484,7 +484,7 @@ static void d3d9_hlsl_deinit_progs(hlsl_renderchain_t *chain)
|
|||
|
||||
static void d3d9_hlsl_destroy_resources(hlsl_renderchain_t *chain)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < TEXTURES; i++)
|
||||
{
|
||||
|
|
|
@ -706,12 +706,12 @@ static void gl2_renderchain_deinit_hw_render(gl2_t *gl, gl2_renderchain_data_t *
|
|||
|
||||
static bool gl2_create_fbo_targets(gl2_t *gl, gl2_renderchain_data_t *chain)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
gl2_gen_fb(chain->fbo_pass, chain->fbo);
|
||||
|
||||
for (i = 0; i < (unsigned)chain->fbo_pass; i++)
|
||||
for (i = 0; i < (size_t)chain->fbo_pass; i++)
|
||||
{
|
||||
gl2_bind_fb(chain->fbo[i]);
|
||||
gl2_fb_texture_2d(RARCH_GL_FRAMEBUFFER,
|
||||
|
@ -937,7 +937,7 @@ static void gl2_renderchain_recompute_pass_sizes(
|
|||
unsigned width, unsigned height,
|
||||
unsigned vp_width, unsigned vp_height)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
bool size_modified = false;
|
||||
GLint max_size = 0;
|
||||
unsigned last_width = width;
|
||||
|
@ -948,7 +948,7 @@ static void gl2_renderchain_recompute_pass_sizes(
|
|||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
|
||||
|
||||
/* Calculate viewports for FBOs. */
|
||||
for (i = 0; i < (unsigned)chain->fbo_pass; i++)
|
||||
for (i = 0; i < (size_t)chain->fbo_pass; i++)
|
||||
{
|
||||
struct video_fbo_rect *fbo_rect = &gl->fbo_rect[i];
|
||||
struct gfx_fbo_scale *fbo_scale = &chain->fbo_scale[i];
|
||||
|
@ -1609,7 +1609,7 @@ static void gl2_renderchain_fence_free(void *data,
|
|||
{
|
||||
#ifndef HAVE_OPENGLES
|
||||
#ifdef HAVE_GL_SYNC
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < chain->fence_count; i++)
|
||||
{
|
||||
glClientWaitSync(chain->fences[i],
|
||||
|
@ -1814,7 +1814,7 @@ bool gl2_load_luts(
|
|||
const void *shader_data,
|
||||
GLuint *textures_lut)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
const struct video_shader *shader =
|
||||
(const struct video_shader*)shader_data;
|
||||
unsigned num_luts = MIN(shader->luts, GFX_MAX_TEXTURES);
|
||||
|
@ -2203,8 +2203,7 @@ static void gl2_update_input_size(gl2_t *gl, unsigned width,
|
|||
|
||||
static void gl2_init_textures_data(gl2_t *gl)
|
||||
{
|
||||
int i;
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < gl->textures; i++)
|
||||
{
|
||||
gl->last_width[i] = gl->tex_w;
|
||||
|
@ -2932,10 +2931,9 @@ static bool gl2_frame(void *data, const void *frame,
|
|||
{
|
||||
/* On resize, we might have to recreate our FBOs
|
||||
* due to "Viewport" scale, and set a new viewport. */
|
||||
int i;
|
||||
|
||||
size_t i;
|
||||
/* Check if we have to recreate our FBO textures. */
|
||||
for (i = 0; i < (unsigned)chain->fbo_pass; i++)
|
||||
for (i = 0; i < (size_t)chain->fbo_pass; i++)
|
||||
{
|
||||
struct video_fbo_rect *fbo_rect = &gl->fbo_rect[i];
|
||||
if (fbo_rect)
|
||||
|
@ -3177,7 +3175,7 @@ static bool gl2_frame(void *data, const void *frame,
|
|||
&& !runloop_is_paused
|
||||
&& (!(gl->flags & GL2_FLAG_MENU_TEXTURE_ENABLE)))
|
||||
{
|
||||
int n;
|
||||
size_t n;
|
||||
for (n = 0; n < black_frame_insertion; ++n)
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
|
|
@ -58,7 +58,7 @@ static const struct video_ortho gl3_default_ortho = {0, 1, 0, 1, -1, 1};
|
|||
|
||||
static void gl3_deinit_fences(gl3_t *gl)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < gl->fence_count; i++)
|
||||
{
|
||||
if (gl->fences[i])
|
||||
|
@ -256,7 +256,7 @@ static void gl3_overlay_tex_geom(void *data,
|
|||
static void gl3_render_overlay(gl3_t *gl,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glDisable(GL_CULL_FACE);
|
||||
|
@ -1252,7 +1252,8 @@ static void video_texture_load_gl3(
|
|||
static bool gl3_overlay_load(void *data,
|
||||
const void *image_data, unsigned num_images)
|
||||
{
|
||||
int i, j;
|
||||
size_t i;
|
||||
int j;
|
||||
GLuint id;
|
||||
gl3_t *gl = (gl3_t*)data;
|
||||
const struct texture_image *images =
|
||||
|
@ -1878,7 +1879,7 @@ static bool gl3_frame(void *data, const void *frame,
|
|||
&& !runloop_is_paused
|
||||
&& (!(gl->flags & GL3_FLAG_MENU_TEXTURE_ENABLE)))
|
||||
{
|
||||
int n;
|
||||
size_t n;
|
||||
for (n = 0; n < black_frame_insertion; ++n)
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
|
|
@ -3182,7 +3182,7 @@ static void vulkan_set_texture_frame(void *data,
|
|||
const void *frame, bool rgb32, unsigned width, unsigned height,
|
||||
float alpha)
|
||||
{
|
||||
int y;
|
||||
size_t y;
|
||||
unsigned stride;
|
||||
uint8_t *ptr = NULL;
|
||||
uint8_t *dst = NULL;
|
||||
|
@ -3244,7 +3244,7 @@ static void vulkan_set_texture_frame(void *data,
|
|||
{
|
||||
for (y = 0; y < height; y++, dst += texture->stride, src += stride)
|
||||
{
|
||||
int x;
|
||||
size_t x;
|
||||
uint16_t *srcpix = (uint16_t*)src;
|
||||
uint32_t *dstpix = (uint32_t*)dst;
|
||||
for (x = 0; x < width; x++, srcpix++, dstpix++)
|
||||
|
|
|
@ -535,7 +535,7 @@ static struct video_shader_parameter *video_shader_parse_find_parameter(
|
|||
struct video_shader_parameter *params,
|
||||
unsigned num_params, const char *id)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < num_params; i++)
|
||||
{
|
||||
|
@ -557,7 +557,7 @@ static struct video_shader_parameter *video_shader_parse_find_parameter(
|
|||
**/
|
||||
void video_shader_resolve_parameters(struct video_shader *shader)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
struct video_shader_parameter *param = &shader->parameters[0];
|
||||
|
||||
shader->num_parameters = 0;
|
||||
|
@ -678,7 +678,7 @@ void video_shader_resolve_parameters(struct video_shader *shader)
|
|||
bool video_shader_load_current_parameter_values(
|
||||
config_file_t *conf, struct video_shader *shader)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
if (!conf)
|
||||
return false;
|
||||
|
@ -781,7 +781,7 @@ static void shader_write_fbo(config_file_t *conf,
|
|||
static bool video_shader_write_root_preset(const struct video_shader *shader,
|
||||
const char *path)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
char key[64];
|
||||
bool ret = true;
|
||||
char *tmp = (char*)malloc(3 * PATH_MAX_LENGTH);
|
||||
|
@ -1113,7 +1113,7 @@ static bool video_shader_write_referenced_preset(
|
|||
const char *path_to_save,
|
||||
const struct video_shader *shader)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
config_file_t *conf = NULL;
|
||||
config_file_t *ref_conf = NULL;
|
||||
struct video_shader *ref_shader = (struct video_shader*)
|
||||
|
@ -1562,7 +1562,7 @@ static bool video_shader_load_root_config_into_shader(
|
|||
settings_t *settings,
|
||||
struct video_shader *shader)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
unsigned num_passes = 0;
|
||||
bool watch_files = settings->bools.video_shader_watch_files;
|
||||
|
||||
|
@ -1674,7 +1674,7 @@ static bool video_shader_load_root_config_into_shader(
|
|||
static bool override_shader_values(config_file_t *override_conf,
|
||||
struct video_shader *shader)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
bool return_val = false;
|
||||
|
||||
if (!shader || !override_conf)
|
||||
|
@ -1806,7 +1806,7 @@ static bool combine_shaders(struct video_shader *combined_shader,
|
|||
struct video_shader *first_shader,
|
||||
struct video_shader *second_shader)
|
||||
{
|
||||
int i, j;
|
||||
size_t i, j;
|
||||
|
||||
for (i = 0; i < first_shader->passes && i <= GFX_MAX_SHADERS; i++)
|
||||
{
|
||||
|
|
|
@ -648,7 +648,7 @@ int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream,
|
|||
|
||||
int64_t retro_vfs_file_write_impl(libretro_vfs_implementation_file *stream, const void *s, uint64_t len)
|
||||
{
|
||||
int64_t pos = 0;
|
||||
int64_t pos = 0;
|
||||
size_t result = -1;
|
||||
|
||||
if (!stream)
|
||||
|
@ -656,7 +656,7 @@ int64_t retro_vfs_file_write_impl(libretro_vfs_implementation_file *stream, cons
|
|||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
{
|
||||
pos = retro_vfs_file_tell_impl(stream);
|
||||
pos = retro_vfs_file_tell_impl(stream);
|
||||
result = fwrite(s, 1, (size_t)len, stream->fp);
|
||||
|
||||
if (result != -1 && pos + result > stream->size)
|
||||
|
@ -669,7 +669,7 @@ int64_t retro_vfs_file_write_impl(libretro_vfs_implementation_file *stream, cons
|
|||
return -1;
|
||||
#endif
|
||||
|
||||
pos = retro_vfs_file_tell_impl(stream);
|
||||
pos = retro_vfs_file_tell_impl(stream);
|
||||
result = write(stream->fd, s, (size_t)len);
|
||||
|
||||
if (result != -1 && pos + result > stream->size)
|
||||
|
|
|
@ -148,7 +148,7 @@ static struct rmsgpack_dom_value query_func_operator_or(
|
|||
struct rmsgpack_dom_value input,
|
||||
unsigned argc, const struct argument * argv)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
struct rmsgpack_dom_value res;
|
||||
|
||||
res.type = RDT_BOOL;
|
||||
|
@ -176,7 +176,7 @@ static struct rmsgpack_dom_value query_func_operator_and(
|
|||
struct rmsgpack_dom_value input,
|
||||
unsigned argc, const struct argument * argv)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
struct rmsgpack_dom_value res;
|
||||
|
||||
res.type = RDT_BOOL;
|
||||
|
@ -287,7 +287,7 @@ static void query_raise_unknown_function(
|
|||
|
||||
static void query_argument_free(struct argument *arg)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
if (arg->type != AT_FUNCTION)
|
||||
{
|
||||
|
@ -445,7 +445,8 @@ static struct buffer query_parse_string(
|
|||
}
|
||||
else if (is_binstr)
|
||||
{
|
||||
int i, j = 0;
|
||||
size_t i;
|
||||
int j = 0;
|
||||
const char *tok = str_start;
|
||||
|
||||
for (i = 0; i < value->val.string.len; i += 2)
|
||||
|
|
|
@ -150,7 +150,7 @@ static int dom_read_map_start(uint32_t len, void *data)
|
|||
|
||||
static int dom_read_array_start(uint32_t len, void *data)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
struct dom_reader_state *dom_state = (struct dom_reader_state *)data;
|
||||
struct rmsgpack_dom_value *v = dom_reader_state_pop(dom_state);
|
||||
struct rmsgpack_dom_value *items = NULL;
|
||||
|
@ -176,7 +176,7 @@ static int dom_read_array_start(uint32_t len, void *data)
|
|||
|
||||
void rmsgpack_dom_value_free(struct rmsgpack_dom_value *v)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
switch (v->type)
|
||||
{
|
||||
case RDT_STRING:
|
||||
|
|
|
@ -1559,7 +1559,7 @@ static INLINE bool preempt_ptr_input_dirty(preempt_t *preempt,
|
|||
static INLINE void preempt_input_poll(preempt_t *preempt,
|
||||
runloop_state_t *runloop_st, settings_t *settings)
|
||||
{
|
||||
int p;
|
||||
size_t p;
|
||||
int16_t joypad_state;
|
||||
retro_input_state_t state_cb = input_driver_state_wrapper;
|
||||
unsigned max_users = settings->uints.input_max_users;
|
||||
|
|
Loading…
Reference in New Issue
Block a user