[Libreoffice-commits] core.git: soltools/mkdepend

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 12 09:05:58 UTC 2019


 soltools/mkdepend/include.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 74c409853f2c7be9f70230f1923e72ef146a4a30
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 11 16:04:29 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 12 11:05:19 2019 +0200

    gcc9.2.1 also warns about truncation here
    
    Change-Id: I8d1cbe259836a9737297a9af0bc762e88ef6148c
    Reviewed-on: https://gerrit.libreoffice.org/78817
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index c95af5451b47..153c62b86c28 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -243,13 +243,13 @@ int issymbolic(char *dir, char *component)
     struct stat st;
     char    buf[ BUFSIZ ], **pp;
 
-#if defined __GNUC__ && __GNUC__ == 8 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3) && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wformat-truncation"
-    // silence "‘snprintf’ output may be truncated before the last format character"
+    // silence "‘snprintf’ output may be truncated before the last format character", from gcc 8.3 to at least 9.2.1
 #endif
     int n = snprintf(buf, BUFSIZ, "%s%s%s", dir, *dir ? "/" : "", component);
-#if defined __GNUC__ && __GNUC__ == 8 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3) && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic pop
 #endif
     assert(n < BUFSIZ);


More information about the Libreoffice-commits mailing list