diff options
author | Felix Herrmann <fherrmann@de.adit-jv.com> | 2020-01-13 10:40:25 +0100 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2020-07-06 10:04:07 +0900 |
commit | 676e8fc1ba927dc84df82b508d796e31d9fd120c (patch) | |
tree | 141271d339f1ba68d0b29fd124e8eaa5d3d99fd4 /src/shared/dlt_common.c | |
parent | ec391decd94ac9f6c6133c24a41c8afb2c01623f (diff) | |
download | DLT-daemon-676e8fc1ba927dc84df82b508d796e31d9fd120c.tar.gz |
fix some gcc9 compiler warnings
Many stringop-truncation and stringop-overflow warnings are still
there (so many).
https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
Diffstat (limited to 'src/shared/dlt_common.c')
-rw-r--r-- | src/shared/dlt_common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c index 642d43d..670b01b 100644 --- a/src/shared/dlt_common.c +++ b/src/shared/dlt_common.c @@ -3042,21 +3042,22 @@ void dlt_get_version(char *buf, size_t size) return; } +/* Clang does not like these macros, because they are not reproducable */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdate-time" snprintf(buf, size, "DLT Package Version: %s %s, Package Revision: %s, build on %s %s\n%s %s %s %s\n", _DLT_PACKAGE_VERSION, _DLT_PACKAGE_VERSION_STATE, _DLT_PACKAGE_REVISION, -/* Clang does not like these macros, because they are not reproducable */ -#pragma clang diagnostic ignored "-Wdate-time" __DATE__, __TIME__, -#pragma clang diagnostic error "-Wdate-time" _DLT_SYSTEMD_ENABLE, _DLT_SYSTEMD_WATCHDOG_ENABLE, _DLT_TEST_ENABLE, _DLT_SHM_ENABLE); +#pragma GCC diagnostic pop } void dlt_get_major_version(char *buf, size_t size) |