mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
Fix static code analysis warnings
This commit is contained in:
parent
a2f2a882cb
commit
968922e151
@ -707,15 +707,17 @@ void CORE_PREFIX(retro_run)(void)
|
||||
if (!decode_thread_dead)
|
||||
{
|
||||
unsigned y;
|
||||
const uint8_t *src;
|
||||
int stride, width;
|
||||
uint32_t *data = video_frame_temp_buffer;
|
||||
|
||||
const uint8_t *src = NULL;
|
||||
video_decoder_context_t *ctx = NULL;
|
||||
uint32_t *data = NULL;
|
||||
|
||||
video_buffer_get_finished_slot(video_buffer, &ctx);
|
||||
pts = ctx->pts;
|
||||
|
||||
#ifndef HAVE_OPENGLES
|
||||
#ifdef HAVE_OPENGLES
|
||||
data = video_frame_temp_buffer;
|
||||
#else
|
||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, frames[1].pbo);
|
||||
#ifdef __MACH__
|
||||
data = (uint32_t*)glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
|
||||
|
8
deps/7zip/7zIn.c
vendored
8
deps/7zip/7zIn.c
vendored
@ -724,8 +724,8 @@ static SRes SzReadSubStreamsInfo(
|
||||
uint32_t **digests,
|
||||
ISzAlloc *allocTemp)
|
||||
{
|
||||
uint64_t type = 0;
|
||||
uint32_t i;
|
||||
uint64_t type = 0;
|
||||
uint32_t si = 0;
|
||||
uint32_t numDigests = 0;
|
||||
|
||||
@ -1168,9 +1168,9 @@ static SRes SzReadAndDecodePackedStreams2(
|
||||
ISzAlloc *allocTemp)
|
||||
{
|
||||
SRes res;
|
||||
uint64_t dataStartPos;
|
||||
CSzFolder *folder;
|
||||
uint64_t unpackSize;
|
||||
CSzFolder *folder = NULL;
|
||||
uint64_t dataStartPos = 0;
|
||||
uint64_t unpackSize = 0;
|
||||
uint32_t numUnpackStreams = 0;
|
||||
|
||||
RINOK(SzReadStreamsInfo(sd, &dataStartPos, p,
|
||||
|
6
deps/mbedtls/net_sockets.c
vendored
6
deps/mbedtls/net_sockets.c
vendored
@ -319,6 +319,8 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx,
|
||||
int type_len = (int) sizeof( type );
|
||||
#endif
|
||||
|
||||
client_addr.ss_family = 0;
|
||||
|
||||
/* Is this a TCP or UDP socket? */
|
||||
if( getsockopt( bind_ctx->fd, SOL_SOCKET, SO_TYPE,
|
||||
(void *) &type, &type_len ) != 0 ||
|
||||
@ -363,8 +365,10 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx,
|
||||
* then bind a new socket to accept new connections */
|
||||
if( type != SOCK_STREAM )
|
||||
{
|
||||
struct sockaddr_storage local_addr;
|
||||
int one = 1;
|
||||
struct sockaddr_storage local_addr;
|
||||
|
||||
local_addr.ss_family = 0;
|
||||
|
||||
if( connect( bind_ctx->fd, (struct sockaddr *) &client_addr, n ) != 0 )
|
||||
return( MBEDTLS_ERR_NET_ACCEPT_FAILED );
|
||||
|
@ -2064,6 +2064,7 @@ static bool gl2_shader_init(gl_t *gl, const gfx_ctx_driver_t *ctx_driver,
|
||||
init_data.gl.core_context_enabled = gl->core_context_in_use;
|
||||
init_data.shader_type = type;
|
||||
init_data.shader = NULL;
|
||||
init_data.shader_data = NULL;
|
||||
init_data.data = gl;
|
||||
init_data.path = shader_path;
|
||||
|
||||
@ -2077,6 +2078,7 @@ static bool gl2_shader_init(gl_t *gl, const gfx_ctx_driver_t *ctx_driver,
|
||||
RARCH_ERR("[GL]: Failed to initialize shader, falling back to stock.\n");
|
||||
|
||||
init_data.shader = NULL;
|
||||
init_data.shader_data = NULL;
|
||||
init_data.path = NULL;
|
||||
|
||||
ret = gl_shader_driver_init(&init_data);
|
||||
|
@ -356,6 +356,8 @@ static uint8_t *rtga_tga_load(rtga_context *s,
|
||||
|
||||
/* do I need to invert the image? */
|
||||
if (tga_inverted)
|
||||
{
|
||||
if (tga_data)
|
||||
{
|
||||
for (j = 0; j*2 < tga_height; ++j)
|
||||
{
|
||||
@ -372,6 +374,7 @@ static uint8_t *rtga_tga_load(rtga_context *s,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear my palette, if I had one */
|
||||
if (tga_palette)
|
||||
|
@ -1548,12 +1548,12 @@ static bool ffmpeg_push_audio_thread(ffmpeg_t *handle,
|
||||
size_t write_frames = write_left > can_write ? can_write : write_left;
|
||||
size_t write_size = write_frames *
|
||||
handle->params.channels * handle->audio.sample_size;
|
||||
|
||||
size_t bytes_in_buffer = handle->audio.frames_in_buffer *
|
||||
handle->params.channels * handle->audio.sample_size;
|
||||
size_t written_bytes = written_frames *
|
||||
handle->params.channels * handle->audio.sample_size;
|
||||
|
||||
if (handle->audio.buffer)
|
||||
memcpy(handle->audio.buffer + bytes_in_buffer,
|
||||
(const uint8_t*)aud->data + written_bytes,
|
||||
write_size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user