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

@ -731,7 +731,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addExtension(spv::E_SPV_EXT_fragment_fully_covered);
builder.addCapability(spv::CapabilityFragmentFullyCoveredEXT);
return spv::BuiltInFullyCoveredEXT;
#endif
#endif
default:
return spv::BuiltInMax;
}
@ -2101,7 +2101,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
break;
case 1:
{
OpDecorations decorations = { precision,
OpDecorations decorations = { precision,
TranslateNoContractionDecoration(node->getType().getQualifier()),
TranslateNonUniformDecoration(node->getType().getQualifier()) };
result = createUnaryOperation(
@ -2204,7 +2204,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
// smear condition to vector, if necessary (AST is always scalar)
if (builder.isVector(trueValue))
condition = builder.smearScalar(spv::NoPrecision, condition,
condition = builder.smearScalar(spv::NoPrecision, condition,
builder.makeVectorType(builder.makeBoolType(),
builder.getNumComponents(trueValue)));
@ -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,
@ -3940,7 +3935,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
}
}
std::vector<spv::Id> result( 1,
std::vector<spv::Id> result( 1,
builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params)
);
@ -6913,7 +6908,7 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName,
out.open(baseName, std::ios::binary | std::ios::out);
if (out.fail())
printf("ERROR: Failed to open file: %s\n", baseName);
out << "\t// " <<
out << "\t// " <<
glslang::GetSpirvGeneratorVersion() << "." << GLSLANG_MINOR_VERSION << "." << GLSLANG_PATCH_LEVEL <<
std::endl;
if (varName != nullptr) {

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

@ -160,7 +160,7 @@ static bool coretext_font_renderer_create_atlas(CTFontRef face, ct_font_renderer
handle->atlas.width = max_width * CT_ATLAS_COLS;
handle->atlas.height = max_height * CT_ATLAS_ROWS;
handle->line_metrics.ascender = (float)CTFontGetAscent(face);
handle->line_metrics.descender = (float)CTFontGetDescent(face);
/* CTFontGetDescent() should return a positive value,
@ -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];
@ -240,7 +240,7 @@ void legacy_pad_connection_pad_deregister(joypad_connection_t *pad_list, pad_con
void pad_connection_pad_deregister(joypad_connection_t *joyconn,
pad_connection_interface_t *iface, void *pad_data)
{
int i;
int i;
if (!iface || !iface->multi_pad)
{
@ -279,7 +279,7 @@ void pad_connection_pad_refresh(joypad_connection_t *joyconn,
state = iface->status(device_data, i);
switch(state)
{
/* The pad slot is bound to a joypad
/* The pad slot is bound to a joypad
that's no longer connected */
case PAD_CONNECT_BOUND:
joypad = iface->joypad(device_data, i);
@ -334,14 +334,14 @@ void pad_connection_pad_register(joypad_connection_t *joyconn,
for (i = 0; i < max_pad; i++)
{
int status = iface->multi_pad
? iface->status(device_data, i)
int status = iface->multi_pad
? iface->status(device_data, i)
: PAD_CONNECT_READY;
if (status == PAD_CONNECT_READY)
{
void *connection = NULL;
int found_slot = (slot == SLOT_AUTO)
? pad_connection_find_vacant_pad(joyconn)
int found_slot = (slot == SLOT_AUTO)
? pad_connection_find_vacant_pad(joyconn)
: slot;
if (found_slot < 0)
continue;
@ -383,7 +383,7 @@ int32_t pad_connection_pad_init_entry(joypad_connection_t *joyconn,
}
else
{
/* We failed to find a matching pad.
/* We failed to find a matching pad.
* Set up one without an interface */
RARCH_DBG("Pad was not matched. Setting up without an interface.\n");
conn->iface = NULL;
@ -429,7 +429,7 @@ void pad_connection_packet(joypad_connection_t *joyconn, uint32_t pad,
{
if ( joyconn
&& joyconn->connected
&& joyconn->connection
&& joyconn->connection
&& joyconn->iface
&& joyconn->iface->packet_handler)
joyconn->iface->packet_handler(joyconn->connection, data, length);

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