A recent merge with master caused the CLANG_WARN_COMMA warning to be enabled, which generates warnings in this ui-separation-and-xpc only file. I thought it would be safest to use #pragma clang diagnostic ignore to quiet the warnings without changing the source file in this file. (#1314)

This commit is contained in:
Daniel Jalkut authored and Kornel committed 2018-11-14 17:26:10 +00:00
1 parent 0a13dfab4a
commit 2e1596c673
2 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -379,7 +379,7 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF
// We should also not allow files with code signed extended attributes since Apple doesn't recommend inserting these
// inside an application, and since we don't preserve extended attribitutes anyway
mode_t permissions = [info[INFO_PERMISSIONS_KEY] unsignedShortValue];
mode_t permissions = [(NSNumber*)info[INFO_PERMISSIONS_KEY] unsignedShortValue];
if (!isSymLink(ent) && !IS_VALID_PERMISSIONS(permissions)) {
if (verbose) {
fprintf(stderr, "\n");
+9
View File
@@ -42,6 +42,13 @@
#define SAIS_MYFREE(_ptr, _num, _type) free((_ptr))
#define chr(_a) (cs == sizeof(sais_index_type) ? ((const sais_index_type *)T)[(_a)] : ((const unsigned char *)T)[(_a)])
// This file exhibits several "suspicious comma" warnings. Rather than risk
// changing a nuanced behavior, I'm assuming the file has been time-tested and
// behaves as expected in spite of the unconventional use of comma operators
// in some expressions.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcomma"
/* find the start or end of each bucket */
static
void
@@ -532,3 +539,5 @@ sais_int_bwt(const sais_index_type *T, sais_index_type *U, sais_index_type *A, i
pidx += 1;
return pidx;
}
#pragma clang diagnostic pop