summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-11-30 12:42:21 +0100
committerPranam Lashkari <lpranam@collabora.com>2022-10-27 13:59:45 +0200
commit7de586083f1d081939d88d8b0984a37c6d2e28e7 (patch)
treeb3612f25f0abdcfd77231e26dfca49e2e5e901cc /sfx2
parent7b5e440dc7b7b710d695a00c51c3b061bc5729ba (diff)
Improve an snprintf printing css::util::DateTime members
...to avoid GCC 12 trunk > extensions/source/logging/csvformatter.cxx: In member function ‘virtual rtl::OUString logging::{anonymous}::CsvFormatter::format(const com::sun::star::logging::LogRecord&)’: > extensions/source/logging/csvformatter.cxx:241:70: error: ‘%02i’ directive output may be truncated writing between 2 and 5 bytes into a region of size between 0 and 14 [-Werror=format-truncation=] > 241 | snprintf( buffer, buffer_size, "%04i-%02i-%02iT%02i:%02i:%02i.%09i", > | ^~~~ > extensions/source/logging/csvformatter.cxx:241:44: note: directive argument in the range [0, 65535] > 241 | snprintf( buffer, buffer_size, "%04i-%02i-%02iT%02i:%02i:%02i.%09i", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > extensions/source/logging/csvformatter.cxx:241:44: note: using the range [-2147483648, 2147483647] for directive argument > extensions/source/logging/csvformatter.cxx:241:21: note: ‘snprintf’ output between 30 and 49 bytes into a destination of size 31 > 241 | snprintf( buffer, buffer_size, "%04i-%02i-%02iT%02i:%02i:%02i.%09i", > | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 242 | static_cast<int>(record.LogTime.Year), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 243 | static_cast<int>(record.LogTime.Month), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 244 | static_cast<int>(record.LogTime.Day), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 245 | static_cast<int>(record.LogTime.Hours), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 246 | static_cast<int>(record.LogTime.Minutes), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 247 | static_cast<int>(record.LogTime.Seconds), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 248 | static_cast<int>(record.LogTime.NanoSeconds) ); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I426fd6c54b69c7dcc2153167961295c3bc5cf91f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126116 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 33a7e65502857687e778444c9b55500b40b4df19) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141849 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
Diffstat (limited to 'sfx2')
0 files changed, 0 insertions, 0 deletions