From 25bf55459e2d732c60a3729e1bceff8ec4da7d03 Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Sun, 29 Sep 2013 17:27:55 -0700 Subject: [PATCH] Silenced some warnings --- Frameworks/WavPack/Files/extra2.c | 2 +- Frameworks/WavPack/Files/md5.c | 2 +- Frameworks/WavPack/Files/pack.c | 2 - Frameworks/WavPack/Files/unpack.c | 6 +- Frameworks/WavPack/Files/unpack3.c | 138 ++++++++++++++------------- Playlist/PlaylistController.h | 2 +- Playlist/PlaylistController.m | 2 +- Playlist/PlaylistEntry.h | 2 +- ThirdParty/AppleRemote/AppleRemote.m | 4 +- 9 files changed, 82 insertions(+), 78 deletions(-) diff --git a/Frameworks/WavPack/Files/extra2.c b/Frameworks/WavPack/Files/extra2.c index 96c4d433b..8900189c5 100644 --- a/Frameworks/WavPack/Files/extra2.c +++ b/Frameworks/WavPack/Files/extra2.c @@ -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) diff --git a/Frameworks/WavPack/Files/md5.c b/Frameworks/WavPack/Files/md5.c index 2b5ff9987..853fdedad 100644 --- a/Frameworks/WavPack/Files/md5.c +++ b/Frameworks/WavPack/Files/md5.c @@ -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 */ } diff --git a/Frameworks/WavPack/Files/pack.c b/Frameworks/WavPack/Files/pack.c index 9d9366b24..ddff615a5 100644 --- a/Frameworks/WavPack/Files/pack.c +++ b/Frameworks/WavPack/Files/pack.c @@ -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; diff --git a/Frameworks/WavPack/Files/unpack.c b/Frameworks/WavPack/Files/unpack.c index 96f6f9444..532adc22c 100644 --- a/Frameworks/WavPack/Files/unpack.c +++ b/Frameworks/WavPack/Files/unpack.c @@ -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; } diff --git a/Frameworks/WavPack/Files/unpack3.c b/Frameworks/WavPack/Files/unpack3.c index 10a77bd3a..9d481a582 100644 --- a/Frameworks/WavPack/Files/unpack3.c +++ b/Frameworks/WavPack/Files/unpack3.c @@ -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; } diff --git a/Playlist/PlaylistController.h b/Playlist/PlaylistController.h index f3a8d688f..3f5f7725a 100644 --- a/Playlist/PlaylistController.h +++ b/Playlist/PlaylistController.h @@ -49,7 +49,7 @@ typedef enum { PlaylistEntry *currentEntry; } -@property(retain) PlaylistEntry *currentEntry; +@property(nonatomic, retain) PlaylistEntry *currentEntry; @property(retain) NSString *totalTime; //Private Methods diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index d0ee195d9..652de6dae 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -649,7 +649,7 @@ [currentEntry release]; currentEntry = pe; -} +} - (void)setShuffle:(ShuffleMode)s { diff --git a/Playlist/PlaylistEntry.h b/Playlist/PlaylistEntry.h index 179f2bdb7..e3f7f7180 100644 --- a/Playlist/PlaylistEntry.h +++ b/Playlist/PlaylistEntry.h @@ -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; diff --git a/ThirdParty/AppleRemote/AppleRemote.m b/ThirdParty/AppleRemote/AppleRemote.m index 7bd91cc4f..c8b7d953d 100644 --- a/ThirdParty/AppleRemote/AppleRemote.m +++ b/ThirdParty/AppleRemote/AppleRemote.m @@ -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]]; } }