[glib] gmessages: Mark non-varargs log functions as static inline



commit 74c5e785d3528437fe3e98181b75b07b81efa479
Author: Steve Lhomme <robux4 gmail com>
Date:   Wed Nov 8 13:06:29 2017 +0000

    gmessages: Mark non-varargs log functions as static inline
    
    Certain compilers warn about unused functions if they are declared in
    the header but are not inline. We require `static inline` support from
    all compilers now.
    
    Typically, this code will not be used, as the compilers we care about
    implement vararg macro support; but this code path can still be hit on
    some compilers (probably; unverified).
    
    (Commit message by Philip Withnall.)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=483341

 glib/gmessages.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/glib/gmessages.h b/glib/gmessages.h
index ee0dca8..b5d1e6a 100644
--- a/glib/gmessages.h
+++ b/glib/gmessages.h
@@ -411,7 +411,7 @@ void g_assert_warning         (const char *log_domain,
 static void g_error (const gchar *format, ...) G_GNUC_NORETURN G_ANALYZER_NORETURN;
 static void g_critical (const gchar *format, ...) G_ANALYZER_NORETURN;
 
-static void
+static inline void
 g_error (const gchar *format,
          ...)
 {
@@ -422,7 +422,7 @@ g_error (const gchar *format,
 
   for(;;) ;
 }
-static void
+static inline void
 g_message (const gchar *format,
            ...)
 {
@@ -431,7 +431,7 @@ g_message (const gchar *format,
   g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args);
   va_end (args);
 }
-static void
+static inline void
 g_critical (const gchar *format,
             ...)
 {
@@ -440,7 +440,7 @@ g_critical (const gchar *format,
   g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args);
   va_end (args);
 }
-static void
+static inline void
 g_warning (const gchar *format,
            ...)
 {
@@ -449,7 +449,7 @@ g_warning (const gchar *format,
   g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args);
   va_end (args);
 }
-static void
+static inline void
 g_info (const gchar *format,
         ...)
 {
@@ -458,7 +458,7 @@ g_info (const gchar *format,
   g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args);
   va_end (args);
 }
-static void
+static inline void
 g_debug (const gchar *format,
          ...)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]