Cleanup some unused variables

This commit is contained in:
libretroadmin 2024-04-06 20:12:15 +02:00
parent ba47f40487
commit a4212061d4
8 changed files with 24 additions and 37 deletions

View file

@ -153,7 +153,7 @@ static void choose_output_device(coreaudio_t *dev, const char* device)
#endif
propaddr.mSelector = kAudioDevicePropertyDeviceName;
for (i = 0; i < deviceCount; i ++)
for (i = 0; i < (int)deviceCount; i ++)
{
char device_name[1024];
device_name[0] = 0;

View file

@ -1216,7 +1216,6 @@ int cheat_manager_add_matches(const char *path,
unsigned int bytes_per_item = 1;
unsigned int bits = 8;
unsigned int curr_val = 0;
unsigned int num_added = 0;
unsigned int offset = 0;
cheat_manager_t *cheat_st = &cheat_manager_state;
unsigned char *curr = cheat_st->curr_memory_buf;
@ -1267,7 +1266,6 @@ int cheat_manager_add_matches(const char *path,
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADDED_MATCHES_FAIL), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
return 0;
}
num_added++;
}
}
else
@ -1281,7 +1279,6 @@ int cheat_manager_add_matches(const char *path,
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADDED_MATCHES_FAIL), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
return 0;
}
num_added++;
}
}

View file

@ -2830,7 +2830,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
{
// Name and decorate the non-hidden members
int offset = -1;
int locationOffset = 0; // for use within the members of this struct
for (int i = 0; i < (int)glslangMembers->size(); i++) {
glslang::TType& glslangMember = *(*glslangMembers)[i].type;
int member = i;
@ -2880,10 +2879,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
if (! type.isArray() && memberQualifier.hasLocation())
builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation);
if (qualifier.hasLocation()) // track for upcoming inheritance
locationOffset += glslangIntermediate->computeTypeLocationSize(
glslangMember, glslangIntermediate->getStage());
// component, XFB, others
if (glslangMember.getQualifier().hasComponent())
builder.addMemberDecoration(spvType, member, spv::DecorationComponent,

View file

@ -3772,9 +3772,6 @@ int yychar;
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
@ -3827,7 +3824,6 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
goto yysetstate;
@ -9867,7 +9863,6 @@ yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if ! YYERROR_VERBOSE
yyerror (pParseContext, YY_("syntax error"));
#else

View file

@ -1101,7 +1101,7 @@ __attribute__ ((noinline))
#endif
void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mpi_uint b )
{
mbedtls_mpi_uint c = 0, t = 0;
mbedtls_mpi_uint c = 0;
#if defined(MULADDC_HUIT)
for( ; i >= 8; i -= 8 )
@ -1152,8 +1152,6 @@ void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mp
}
#endif /* MULADDC_HUIT */
t++;
do {
*d += c; c = ( *d < c ); d++;
}

View file

@ -196,11 +196,11 @@ static bool coretext_font_renderer_create_atlas(CTFontRef face, ct_font_renderer
{
unsigned offset_x, offset_y, r, c;
char glyph_cstr[2];
const uint8_t *src;
uint8_t *dst;
CTLineRef line;
CFStringRef glyph_cfstr;
CFAttributedStringRef attrString;
CTLineRef line = NULL;
const uint8_t *src = NULL;
uint8_t *dst = NULL;
struct font_glyph *glyph = &handle->atlas_slots[i].glyph;
if (!glyph)
@ -239,9 +239,9 @@ static bool coretext_font_renderer_create_atlas(CTFontRef face, ct_font_renderer
dst = (uint8_t*)handle->atlas.buffer;
src = (const uint8_t*)bitmapData;
for (r = 0; r < max_height; r++)
for (r = 0; r < (unsigned)max_height; r++)
{
for (c = 0; c < max_width; c++)
for (c = 0; c < (unsigned)max_width; c++)
{
unsigned src_idx = (unsigned)(r * bytesPerRow + c);
unsigned dest_idx =

View file

@ -151,7 +151,7 @@ joypad_connection_t *pad_connection_init(unsigned pads)
if (!(joyconn = (joypad_connection_t*)calloc(pads+1, sizeof(joypad_connection_t))))
return NULL;
for (i = 0; i < pads; i++)
for (i = 0; i < (int)pads; i++)
{
joypad_connection_t *conn = (joypad_connection_t*)&joyconn[i];

View file

@ -393,6 +393,7 @@ static INLINE bool translation_user_error(const char *message)
return translation_user_message(message, true);
}
#if 0
/**
* Displays the given message on screen and returns true. Returns false if no
* {message} is provided (i.e. it is NULL). The message will be displayed as
@ -403,6 +404,7 @@ static INLINE bool translation_user_info(const char *message)
{
return translation_user_message(message, false);
}
#endif
/**
* Displays the given hash on screen and returns true. Returns false if no