mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
More static code analysis nits
This commit is contained in:
parent
6db07f7fd8
commit
b1c47d686c
@ -1002,9 +1002,6 @@ static int rsnd_send_info_query(rsound_t *rd)
|
|||||||
// In that case, we read the packet.
|
// In that case, we read the packet.
|
||||||
static int rsnd_update_server_info(rsound_t *rd)
|
static int rsnd_update_server_info(rsound_t *rd)
|
||||||
{
|
{
|
||||||
|
|
||||||
ssize_t rc;
|
|
||||||
|
|
||||||
long long int client_ptr = -1;
|
long long int client_ptr = -1;
|
||||||
long long int serv_ptr = -1;
|
long long int serv_ptr = -1;
|
||||||
char temp[RSD_PROTO_MAXSIZE + 1] = {0};
|
char temp[RSD_PROTO_MAXSIZE + 1] = {0};
|
||||||
@ -1012,6 +1009,7 @@ static int rsnd_update_server_info(rsound_t *rd)
|
|||||||
// We read until we have the last (most recent) data in the network buffer.
|
// We read until we have the last (most recent) data in the network buffer.
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
ssize_t rc;
|
||||||
const char *substr;
|
const char *substr;
|
||||||
char *tmpstr;
|
char *tmpstr;
|
||||||
memset(temp, 0, sizeof(temp));
|
memset(temp, 0, sizeof(temp));
|
||||||
@ -1315,21 +1313,19 @@ int rsd_stop(rsound_t *rd)
|
|||||||
|
|
||||||
size_t rsd_write( rsound_t *rsound, const void* buf, size_t size)
|
size_t rsd_write( rsound_t *rsound, const void* buf, size_t size)
|
||||||
{
|
{
|
||||||
|
size_t max_write, written = 0;
|
||||||
assert(rsound != NULL);
|
assert(rsound != NULL);
|
||||||
if ( !rsound->ready_for_data )
|
if ( !rsound->ready_for_data )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
size_t result;
|
max_write = (rsound->buffer_size - rsound->backend_info.chunk_size)/2;
|
||||||
size_t max_write = (rsound->buffer_size - rsound->backend_info.chunk_size)/2;
|
|
||||||
|
|
||||||
size_t written = 0;
|
|
||||||
size_t write_size;
|
|
||||||
|
|
||||||
/* Makes sure that we can handle arbitrary large write sizes */
|
/* Makes sure that we can handle arbitrary large write sizes */
|
||||||
|
|
||||||
while ( written < size )
|
while ( written < size )
|
||||||
{
|
{
|
||||||
write_size = (size - written) > max_write ? max_write : (size - written);
|
size_t result;
|
||||||
|
size_t write_size = (size - written) > max_write ? max_write : (size - written);
|
||||||
result = rsnd_fill_buffer(rsound, (const char*)buf + written, write_size);
|
result = rsnd_fill_buffer(rsound, (const char*)buf + written, write_size);
|
||||||
|
|
||||||
if ( result <= 0 )
|
if ( result <= 0 )
|
||||||
|
@ -306,11 +306,14 @@ void CORE_PREFIX(retro_reset)(void)
|
|||||||
|
|
||||||
static void check_variables(void)
|
static void check_variables(void)
|
||||||
{
|
{
|
||||||
struct retro_variable color_var, var, fft_var, fft_ms_var;
|
struct retro_variable color_var = {0};
|
||||||
|
#ifdef HAVE_OPENGL
|
||||||
(void)var;
|
struct retro_variable var = {0};
|
||||||
(void)fft_var;
|
#endif
|
||||||
(void)fft_ms_var;
|
#ifdef HAVE_GL_FFT
|
||||||
|
struct retro_variable fft_var = {0};
|
||||||
|
struct retro_variable fft_ms_var = {0};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
var.key = "ffmpeg_temporal_interp";
|
var.key = "ffmpeg_temporal_interp";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user