summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-05-17 21:54:15 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-05-18 03:56:49 +0200
commit2da6766f7598a7d77ac362caded2bba1a4d20318 (patch)
tree58573b8839bec3990d5d6fb6007756fb84977886
parentd9454f11d579af0f2cdd8141fb07ee73af4951fd (diff)
downloadrockbox-2da6766f75.tar.gz
rockbox-2da6766f75.zip
bookmark: #pragma diagnostic push/pop requires GCC >= 4.6
Change-Id: I7daf6acebd65dd25aa55242535e1df064f1dc260
-rw-r--r--apps/bookmark.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index c07e2feb70..b19841fda0 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -375,8 +375,8 @@ static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
/* GCC 7 and up complain about the snprintf in create_bookmark() when
compiled with -D_FORTIFY_SOURCE or -Wformat-truncation
This is a false positive, so disable it here only */
-#pragma GCC diagnostic push
#if __GNUC__ >= 7
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation"
#endif
/* ----------------------------------------------------------------------- */
@@ -447,7 +447,9 @@ static char* create_bookmark()
else
return NULL;
}
+#if __GNUC__ >= 7
#pragma GCC diagnostic pop /* -Wformat-truncation */
+#endif
/* ----------------------------------------------------------------------- */
/* This function will determine if an autoload is necessary. This is an */