[Various] Clean up various warnings

Various warnings related to uninitialized variables, or setting values
to variables that would not be used later or would be overwritten by per
loop initializers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-11 13:42:42 -07:00
parent f02a36fd08
commit 90b83f8f51
5 changed files with 20 additions and 20 deletions

View File

@ -75,7 +75,7 @@ struct r8bstate {
size_t blockCount = inCount;
if(blockCount > bufferCapacity)
blockCount = bufferCapacity;
int outputDone;
int outputDone = 0;
for(i = 0; i < channelCount; ++i) {
double *outputPointer;
vDSP_vspdp(input + i, channelCount, &InBuf[0], 1, blockCount);

View File

@ -385,8 +385,8 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
NSUInteger index = [cellIdentifiers indexOfObject:[tableColumn identifier]];
NSSortDescriptor *sortDescriptor = [tableColumn sortDescriptorPrototype];
NSArray *sortDescriptors = sortDescriptor ? @[sortDescriptor] : @[];
NSSortDescriptor *sortDescriptor;/* = [tableColumn sortDescriptorPrototype];*/
NSArray *sortDescriptors;/* = sortDescriptor ? @[sortDescriptor] : @[];*/
BOOL ascending;

View File

@ -650,7 +650,7 @@ json_value * json_parse_ex (json_settings * settings,
{
if ( (++ state.ptr) == end)
{
b = 0;
/*b = 0;*/
break;
}

View File

@ -577,7 +577,7 @@ static SQLiteStore *g_sharedStore = NULL;
dbExists = YES;
if(sqlite3_open([g_databasePath UTF8String], &g_database) == SQLITE_OK) {
char *error;
char *error = "";
if(!dbExists) {
NSArray *schemas = createSchema();
@ -799,7 +799,7 @@ static SQLiteStore *g_sharedStore = NULL;
return string;
}
int64_t returnId, refcount;
int64_t returnId; /*, refcount;*/
int rc = sqlite3_step(st);
@ -809,7 +809,7 @@ static SQLiteStore *g_sharedStore = NULL;
if(rc == SQLITE_ROW) {
returnId = sqlite3_column_int64(st, select_string_out_string_id);
refcount = sqlite3_column_int64(st, select_string_out_reference_count);
/*refcount = sqlite3_column_int64(st, select_string_out_reference_count);*/
}
sqlite3_reset(st);
@ -825,7 +825,7 @@ static SQLiteStore *g_sharedStore = NULL;
}
returnId = sqlite3_last_insert_rowid(g_database);
refcount = 1;
/*refcount = 1;*/
[stringTable setObject:string forKey:[[NSNumber numberWithInteger:returnId] stringValue]];
} else {
@ -961,7 +961,7 @@ static SQLiteStore *g_sharedStore = NULL;
return art;
}
int64_t returnId, refcount;
int64_t returnId; /*, refcount;*/
int rc = sqlite3_step(st);
@ -971,7 +971,7 @@ static SQLiteStore *g_sharedStore = NULL;
if(rc == SQLITE_ROW) {
returnId = sqlite3_column_int64(st, select_art_out_art_id);
refcount = sqlite3_column_int64(st, select_art_out_reference_count);
/*refcount = sqlite3_column_int64(st, select_art_out_reference_count);*/
}
sqlite3_reset(st);
@ -988,7 +988,7 @@ static SQLiteStore *g_sharedStore = NULL;
}
returnId = sqlite3_last_insert_rowid(g_database);
refcount = 1;
/*refcount = 1;*/
[artTable setObject:art forKey:[[NSNumber numberWithInteger:returnId] stringValue]];
} else {
@ -1103,7 +1103,7 @@ static SQLiteStore *g_sharedStore = NULL;
NSString *urlString = [url absoluteString];
int64_t urlId = -1;
urlString = [self addString:urlString returnId:&urlId];
[self addString:urlString returnId:&urlId];
sqlite3_stmt *st = stmt[stmt_select_track];
@ -1113,7 +1113,7 @@ static SQLiteStore *g_sharedStore = NULL;
return -1;
}
int64_t ret, refcount;
int64_t ret/*, refcount*/;
int rc = sqlite3_step(st);
@ -1124,7 +1124,7 @@ static SQLiteStore *g_sharedStore = NULL;
if(rc == SQLITE_ROW) {
ret = sqlite3_column_int64(st, select_track_out_track_id);
refcount = sqlite3_column_int64(st, select_track_out_reference_count);
/*refcount = sqlite3_column_int64(st, select_track_out_reference_count);*/
}
sqlite3_reset(stmt[stmt_select_string]);
@ -1235,7 +1235,7 @@ static SQLiteStore *g_sharedStore = NULL;
}
ret = sqlite3_last_insert_rowid(g_database);
refcount = 1;
/*refcount = 1;*/
} else {
[self removeString:urlId]; // should only be bumped once per instance of track
@ -1259,7 +1259,7 @@ static SQLiteStore *g_sharedStore = NULL;
NSString *urlString = [url absoluteString];
int64_t urlId = -1;
urlString = [self addString:urlString returnId:&urlId];
[self addString:urlString returnId:&urlId];
sqlite3_stmt *st = stmt[stmt_select_track];
@ -1269,7 +1269,7 @@ static SQLiteStore *g_sharedStore = NULL;
return;
}
int64_t trackId, refcount;
int64_t trackId; /*, refcount; */
int rc = sqlite3_step(st);
@ -1282,7 +1282,7 @@ static SQLiteStore *g_sharedStore = NULL;
if(rc == SQLITE_ROW) {
trackId = sqlite3_column_int64(st, select_track_out_track_id);
refcount = sqlite3_column_int64(st, select_track_out_reference_count);
/*refcount = sqlite3_column_int64(st, select_track_out_reference_count);*/
}
sqlite3_reset(stmt[stmt_select_string]);

View File

@ -336,7 +336,7 @@ _generate_octave_note_bars(ddb_analyzer_t *analyzer) {
}
int minBand = -1;
int maxBand = -1;
/*int maxBand = -1;*/
ddb_analyzer_bar_t *prev_bar = NULL;
for(int i = 0; i < OCTAVES * STEPS; i += analyzer->octave_bars_step) {
@ -350,7 +350,7 @@ _generate_octave_note_bars(ddb_analyzer_t *analyzer) {
minBand = i;
}
maxBand = i;
/*maxBand = i;*/
ddb_analyzer_bar_t *bar = analyzer->bars + analyzer->bar_count;