Silenced some warnings

CQTexperiment
Chris Moeller 2013-09-29 17:27:55 -07:00
parent a93ec7b95f
commit 25bf55459e
9 changed files with 82 additions and 78 deletions

View File

@ -529,7 +529,7 @@ void analyze_stereo (WavpackContext *wpc, int32_t *samples)
else if (wpc->config.flags & CONFIG_FAST_FLAG)
decorr_terms = fast_terms;
info.nterms = strlen (decorr_terms);
info.nterms = strlen ((const char *)decorr_terms);
if (wpc->config.extra_flags & EXTRA_TERMS)
if ((info.nterms += (wpc->config.extra_flags & EXTRA_TERMS) >> 10) > MAX_NTERMS)

View File

@ -157,7 +157,7 @@ void MD5Final(digest, ctx)
MD5Transform(ctx->buf, (uint32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}

View File

@ -54,7 +54,6 @@ const signed char fast_terms [] = { 17,17,0 };
void pack_init (WavpackContext *wpc)
{
WavpackStream *wps = wpc->streams [wpc->current_stream];
uint32_t flags = wps->wphdr.flags;
wps->sample_index = 0;
wps->delta_decay = 2.0;
@ -663,7 +662,6 @@ static int pack_samples (WavpackContext *wpc, int32_t *buffer)
WavpackStream *wps = wpc->streams [wpc->current_stream];
uint32_t sample_count = wps->wphdr.block_samples;
uint32_t flags = wps->wphdr.flags, data_count;
int mag16 = ((flags & MAG_MASK) >> MAG_LSB) >= 16;
int tcount, lossy = FALSE, m = 0;
double noise_acc = 0.0, noise;
struct decorr_pass *dpp;

View File

@ -103,7 +103,7 @@ int unpack_init (WavpackContext *wpc)
int init_wv_bitstream (WavpackStream *wps, WavpackMetadata *wpmd)
{
bs_open_read (&wps->wvbits, wpmd->data, (char *) wpmd->data + wpmd->byte_length);
bs_open_read (&wps->wvbits, wpmd->data, (uchar *) wpmd->data + wpmd->byte_length);
return TRUE;
}
@ -112,7 +112,7 @@ int init_wv_bitstream (WavpackStream *wps, WavpackMetadata *wpmd)
int init_wvc_bitstream (WavpackStream *wps, WavpackMetadata *wpmd)
{
bs_open_read (&wps->wvcbits, wpmd->data, (char *) wpmd->data + wpmd->byte_length);
bs_open_read (&wps->wvcbits, wpmd->data, (uchar *) wpmd->data + wpmd->byte_length);
return TRUE;
}
@ -132,7 +132,7 @@ int init_wvx_bitstream (WavpackStream *wps, WavpackMetadata *wpmd)
wps->crc_wvx |= (int32_t) *cp++ << 16;
wps->crc_wvx |= (int32_t) *cp++ << 24;
bs_open_read (&wps->wvxbits, cp, (char *) wpmd->data + wpmd->byte_length);
bs_open_read (&wps->wvxbits, cp, (uchar *) wpmd->data + wpmd->byte_length);
return TRUE;
}

View File

@ -482,21 +482,23 @@ static int unpack_size (WavpackStream3 *wps)
byte_sum += sizeof (wps->dc.weight);
}
if (flags & (HIGH_FLAG | NEW_HIGH_FLAG))
for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++)
if (dpp->term > 0) {
byte_sum += sizeof (dpp->samples_A [0]) * dpp->term;
byte_sum += sizeof (dpp->weight_A);
if (flags & (HIGH_FLAG | NEW_HIGH_FLAG)) {
for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) {
if (dpp->term > 0) {
byte_sum += sizeof (dpp->samples_A [0]) * dpp->term;
byte_sum += sizeof (dpp->weight_A);
if (!(flags & MONO_FLAG)) {
byte_sum += sizeof (dpp->samples_B [0]) * dpp->term;
byte_sum += sizeof (dpp->weight_B);
}
}
else {
byte_sum += sizeof (dpp->samples_A [0]) + sizeof (dpp->samples_B [0]);
byte_sum += sizeof (dpp->weight_A) + sizeof (dpp->weight_B);
}
if (!(flags & MONO_FLAG)) {
byte_sum += sizeof (dpp->samples_B [0]) * dpp->term;
byte_sum += sizeof (dpp->weight_B);
}
}
else {
byte_sum += sizeof (dpp->samples_A [0]) + sizeof (dpp->samples_B [0]);
byte_sum += sizeof (dpp->weight_A) + sizeof (dpp->weight_B);
}
}
}
return byte_sum;
}
@ -550,37 +552,39 @@ static void *unpack_save (WavpackStream3 *wps, void *destin)
SAVE (destin, wps->dc.weight);
}
if (flags & (HIGH_FLAG | NEW_HIGH_FLAG))
for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++)
if (dpp->term > 0) {
int count = dpp->term;
int index = wps->dc.m;
if (flags & (HIGH_FLAG | NEW_HIGH_FLAG)) {
for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) {
if (dpp->term > 0) {
int count = dpp->term;
int index = wps->dc.m;
SAVE (destin, dpp->weight_A);
SAVE (destin, dpp->weight_A);
while (count--) {
SAVE (destin, dpp->samples_A [index]);
index = (index + 1) & (MAX_TERM - 1);
}
while (count--) {
SAVE (destin, dpp->samples_A [index]);
index = (index + 1) & (MAX_TERM - 1);
}
if (!(flags & MONO_FLAG)) {
count = dpp->term;
index = wps->dc.m;
if (!(flags & MONO_FLAG)) {
count = dpp->term;
index = wps->dc.m;
SAVE (destin, dpp->weight_B);
SAVE (destin, dpp->weight_B);
while (count--) {
SAVE (destin, dpp->samples_B [index]);
index = (index + 1) & (MAX_TERM - 1);
}
}
}
else {
SAVE (destin, dpp->weight_A);
SAVE (destin, dpp->weight_B);
SAVE (destin, dpp->samples_A [0]);
SAVE (destin, dpp->samples_B [0]);
}
while (count--) {
SAVE (destin, dpp->samples_B [index]);
index = (index + 1) & (MAX_TERM - 1);
}
}
}
else {
SAVE (destin, dpp->weight_A);
SAVE (destin, dpp->weight_B);
SAVE (destin, dpp->samples_A [0]);
SAVE (destin, dpp->samples_B [0]);
}
}
}
return destin;
}
@ -662,37 +666,39 @@ static void *unpack_restore (WavpackStream3 *wps, void *source, int keep_resourc
RESTORE (wps->dc.weight, source);
}
if (flags & (HIGH_FLAG | NEW_HIGH_FLAG))
for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++)
if (dpp->term > 0) {
int count = dpp->term;
int index = wps->dc.m;
if (flags & (HIGH_FLAG | NEW_HIGH_FLAG)) {
for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) {
if (dpp->term > 0) {
int count = dpp->term;
int index = wps->dc.m;
RESTORE (dpp->weight_A, source);
RESTORE (dpp->weight_A, source);
while (count--) {
RESTORE (dpp->samples_A [index], source);
index = (index + 1) & (MAX_TERM - 1);
}
while (count--) {
RESTORE (dpp->samples_A [index], source);
index = (index + 1) & (MAX_TERM - 1);
}
if (!(flags & MONO_FLAG)) {
count = dpp->term;
index = wps->dc.m;
if (!(flags & MONO_FLAG)) {
count = dpp->term;
index = wps->dc.m;
RESTORE (dpp->weight_B, source);
RESTORE (dpp->weight_B, source);
while (count--) {
RESTORE (dpp->samples_B [index], source);
index = (index + 1) & (MAX_TERM - 1);
}
}
}
else {
RESTORE (dpp->weight_A, source);
RESTORE (dpp->weight_B, source);
RESTORE (dpp->samples_A [0], source);
RESTORE (dpp->samples_B [0], source);
}
while (count--) {
RESTORE (dpp->samples_B [index], source);
index = (index + 1) & (MAX_TERM - 1);
}
}
}
else {
RESTORE (dpp->weight_A, source);
RESTORE (dpp->weight_B, source);
RESTORE (dpp->samples_A [0], source);
RESTORE (dpp->samples_B [0], source);
}
}
}
return source;
}

View File

@ -49,7 +49,7 @@ typedef enum {
PlaylistEntry *currentEntry;
}
@property(retain) PlaylistEntry *currentEntry;
@property(nonatomic, retain) PlaylistEntry *currentEntry;
@property(retain) NSString *totalTime;
//Private Methods

View File

@ -649,7 +649,7 @@
[currentEntry release];
currentEntry = pe;
}
}
- (void)setShuffle:(ShuffleMode)s
{

View File

@ -79,7 +79,7 @@
@property(retain) NSString *artist;
@property(retain) NSString *album;
@property(retain) NSString *title;
@property(nonatomic, retain) NSString *title;
@property(retain) NSString *genre;
@property(retain) NSNumber *year;
@property(retain) NSNumber *track;

View File

@ -461,7 +461,7 @@ static AppleRemote* sharedInstance=nil;
// happen when the main thread is too busy to handle all incoming events in time.
NSString* subCookieString;
NSString* lastSubCookieString=nil;
while(subCookieString = [self validCookieSubstring: cookieString]) {
while((subCookieString = [self validCookieSubstring: cookieString])) {
cookieString = [cookieString substringFromIndex: [subCookieString length]];
lastSubCookieString = subCookieString;
if (processesBacklog) [self handleEventWithCookieString: subCookieString sumOfValues:sumOfValues];
@ -501,7 +501,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
if (((int)event.elementCookie)!=5) {
sumOfValues+=event.value;
[cookieString appendString:[NSString stringWithFormat:@"%d_", event.elementCookie]];
[cookieString appendString:[NSString stringWithFormat:@"%p_", event.elementCookie]];
}
}