diff options
Diffstat (limited to 'apps/bookmark.c')
-rw-r--r-- | apps/bookmark.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index 1860d5737b..c07e2feb70 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -372,7 +372,13 @@ static bool add_bookmark(const char* bookmark_file_name, const char* bookmark, | |||
372 | return true; | 372 | return true; |
373 | } | 373 | } |
374 | 374 | ||
375 | 375 | /* GCC 7 and up complain about the snprintf in create_bookmark() when | |
376 | compiled with -D_FORTIFY_SOURCE or -Wformat-truncation | ||
377 | This is a false positive, so disable it here only */ | ||
378 | #pragma GCC diagnostic push | ||
379 | #if __GNUC__ >= 7 | ||
380 | #pragma GCC diagnostic ignored "-Wformat-truncation" | ||
381 | #endif | ||
376 | /* ----------------------------------------------------------------------- */ | 382 | /* ----------------------------------------------------------------------- */ |
377 | /* This function takes the system resume data and formats it into a valid */ | 383 | /* This function takes the system resume data and formats it into a valid */ |
378 | /* bookmark. */ | 384 | /* bookmark. */ |
@@ -441,6 +447,7 @@ static char* create_bookmark() | |||
441 | else | 447 | else |
442 | return NULL; | 448 | return NULL; |
443 | } | 449 | } |
450 | #pragma GCC diagnostic pop /* -Wformat-truncation */ | ||
444 | 451 | ||
445 | /* ----------------------------------------------------------------------- */ | 452 | /* ----------------------------------------------------------------------- */ |
446 | /* This function will determine if an autoload is necessary. This is an */ | 453 | /* This function will determine if an autoload is necessary. This is an */ |