Isolate the GCC pragmas properly; since clang defines __GNUC__,
explicitly check for __clang__ too.
---
conversion.c | 2 ++
ssh.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/conversion.c b/conversion.c
index 3d07c7e..044cee3 100644
--- a/conversion.c
+++ b/conversion.c
@@ -150,7 +150,9 @@ set_control_h (mexp_h *new_h)
pthread_mutex_unlock (&cancel_requested_mutex);
}
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
+#endif
int
start_conversion (struct config *config,
void (*notify_ui) (int type, const char *data))
diff --git a/ssh.c b/ssh.c
index bb86fa9..c11ef11 100644
--- a/ssh.c
+++ b/ssh.c
@@ -768,7 +768,9 @@ static void add_input_driver (const char *name, size_t len);
static void add_output_driver (const char *name, size_t len);
static int compatible_version (const char *v2v_version);
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" /* WTF? */
+#endif
int
test_connection (struct config *config)
{
--
2.21.0