[Libreoffice-commits] core.git: sal/osl

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 27 07:56:04 UTC 2019


 sal/osl/unx/thread.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 9da29bdc19b7135c5141cde7ae463101e3d4d69b
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Nov 26 19:51:02 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 27 08:54:38 2019 +0100

    Hide parts of sal/osl/unx/thread.cxx only used by !NO_PTHREAD_PRIORITY
    
    (to silence upcoming loplugin:unusedmember)
    
    Change-Id: I86e340e6ade043e020609f0f4da58ba94be6ab1b
    Reviewed-on: https://gerrit.libreoffice.org/83817
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index fb694ebd92cd..b47e13bf49ed 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -88,6 +88,7 @@ typedef struct osl_thread_impl_st
     pthread_cond_t      m_Cond;
 } Thread_Impl;
 
+#if !defined NO_PTHREAD_PRIORITY
 struct osl_thread_priority_st
 {
     int m_Highest;
@@ -96,10 +97,14 @@ struct osl_thread_priority_st
     int m_Below_Normal;
     int m_Lowest;
 };
+#endif
 
 }
 
+#if !defined NO_PTHREAD_PRIORITY
 #define OSL_THREAD_PRIORITY_INITIALIZER { 127, 96, 64, 32, 0 }
+#endif
+
 static void osl_thread_priority_init_Impl();
 
 namespace {
@@ -120,7 +125,9 @@ namespace {
 struct osl_thread_global_st
 {
     pthread_once_t                    m_once;
+#if !defined NO_PTHREAD_PRIORITY
     struct osl_thread_priority_st     m_priority;
+#endif
     struct osl_thread_textencoding_st m_textencoding;
 };
 
@@ -129,7 +136,9 @@ struct osl_thread_global_st
 static struct osl_thread_global_st g_thread =
 {
     PTHREAD_ONCE_INIT,
+#if !defined NO_PTHREAD_PRIORITY
     OSL_THREAD_PRIORITY_INITIALIZER,
+#endif
     OSL_THREAD_TEXTENCODING_INITIALIZER
 };
 


More information about the Libreoffice-commits mailing list