Fix conditional around closing #pragma GCC diagnostic pop

...which 7cf3574ac9 "Avoid
-Werror=format/stringop-truncation" had failed to adapt

Change-Id: Ide00c8136db27519c2d694576910c423d40d481e
Reviewed-on: https://gerrit.libreoffice.org/71521
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2019-04-29 12:35:40 +02:00
parent 0d5ae0b0e8
commit df5d1e47c3
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ void HWPStyle::SetName(int n, char const *name)
auto const p = DATA[n].name;
strncpy(p, name, MAXSTYLENAME);
p[MAXSTYLENAME] = '\0'; // just in case, even though the array is zero-initialized
#if defined __GNUC__ && __GNUC__ == 8 && __GNUC_MINOR__ == 2 && !defined __clang__
#if defined __GNUC__ && __GNUC__ == 8 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3) && !defined __clang__
#pragma GCC diagnostic pop
#endif
}

View File

@@ -249,7 +249,7 @@ int issymbolic(char *dir, char *component)
// silence "snprintf output may be truncated before the last format character"
#endif
int n = snprintf(buf, BUFSIZ, "%s%s%s", dir, *dir ? "/" : "", component);
#if defined __GNUC__ && __GNUC__ == 8 && __GNUC_MINOR__ == 2 && !defined __clang__
#if defined __GNUC__ && __GNUC__ == 8 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3) && !defined __clang__
#pragma GCC diagnostic pop
#endif
assert(n < BUFSIZ);