summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@nil.im>2020-07-25 18:32:42 +0000
committerJonathan Schleifer <js@nil.im>2020-07-25 18:32:42 +0000
commit68e2a033000fa09b43558cd4f33d4e5fa437e3bc (patch)
treeb07d94e9f180bd0460200720680c683553bf6f5c
parentad273d1c82fb77551901c0e86dc998fc1eae4bea (diff)
OFDate: Also ignore -Wunknown-pragmas
This makes old versions of Clang happy which don't know about -Wobjc-designated-initializers. FossilOrigin-Name: 94c7e3e8f3eefbfceef5502de4cdb8c3b94ffb45bbeec69c709f354187b8e3fe
-rw-r--r--src/OFDate.m1
-rw-r--r--src/macros.h14
2 files changed, 8 insertions, 7 deletions
diff --git a/src/OFDate.m b/src/OFDate.m
index 55421ce5..6197b3f3 100644
--- a/src/OFDate.m
+++ b/src/OFDate.m
@@ -281,6 +281,7 @@ tmAndTzToTime(struct tm *tm, int16_t *tz)
#ifdef __clang__
/* We intentionally don't call into super, so silence the warning. */
# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wunknown-pragmas"
# pragma clang diagnostic ignored "-Wobjc-designated-initializers"
#endif
- (instancetype)initWithTimeIntervalSince1970: (of_time_interval_t)seconds
diff --git a/src/macros.h b/src/macros.h
index 607b68b1..bdcef652 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -417,13 +417,13 @@
abort();
#endif
#ifdef __clang__
-# define OF_DEALLOC_UNSUPPORTED \
- [self doesNotRecognizeSelector: _cmd]; \
- \
- abort(); \
- \
- _Pragma("clang diagnostic push ignore \"-Wunreachable-code\""); \
- [super dealloc]; /* Get rid of a stupid warning */ \
+# define OF_DEALLOC_UNSUPPORTED \
+ [self doesNotRecognizeSelector: _cmd]; \
+ \
+ abort(); \
+ \
+ _Pragma("clang diagnostic push ignored \"-Wunreachable-code\""); \
+ [super dealloc]; /* Get rid of a stupid warning */ \
_Pragma("clang diagnostic pop");
#else
# define OF_DEALLOC_UNSUPPORTED \