sal/osl/all/log.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 85a2b2222da0e535446ce46bfcc60d13dad714f1
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Jul 2 20:12:52 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Oct 14 12:17:46 2024 +0200

    cid#1557682 Initialization or destruction ordering is unspecified
    
    Change-Id: I886733628601d551d544b5abf0eae947b49b8ca6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174882
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index dd91d4ea2944..96afdd68c810 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -276,6 +276,10 @@ void maybeOutputTimestamp(std::ostringstream &s) {
         s << ts << '.' << milliSecs << ':';
     }
 
+// disable this fairly obscure feature when building with coverity
+// to avoid a bazillion 'Initialization or destruction ordering is unspecified'
+// warnings about the use of aStartTime
+#if !defined(__COVERITY__) || __COVERITY_MAJOR__ > 2023
     if (outputRelativeTimer)
     {
         int seconds = now.Seconds - aStartTime.aTime.Seconds;
@@ -291,6 +295,7 @@ void maybeOutputTimestamp(std::ostringstream &s) {
         snprintf(relativeTimestamp, sizeof(relativeTimestamp), "%d.%03d", 
seconds, milliSeconds);
         s << relativeTimestamp << ':';
     }
+#endif
 }
 
 #endif

Reply via email to