[glib/glib-2-44] gwin32.c: Avoid a GCC warning



commit e7c8cb02ef6779e31a3907b325b47c76b6f4460d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jan 28 15:55:11 2016 +0800

    gwin32.c: Avoid a GCC warning
    
    Add a pair of braces to make things more clear, to avoid a warning
    when -Wparentheses is used.
    
    Reported by Ignacio Casal Quinteiro.

 glib/gwin32.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/glib/gwin32.c b/glib/gwin32.c
index edbf0a8..444f3ca 100644
--- a/glib/gwin32.c
+++ b/glib/gwin32.c
@@ -598,11 +598,13 @@ g_win32_check_windows_version (const gint major,
   if (osverinfo.dwMajorVersion > major)
     is_ver_checked = TRUE;
   else if (osverinfo.dwMajorVersion == major)
-    if (osverinfo.dwMinorVersion > minor)
-      is_ver_checked = TRUE;
-    else if (osverinfo.dwMinorVersion == minor)
-      if (osverinfo.wServicePackMajor >= spver)
+    {
+      if (osverinfo.dwMinorVersion > minor)
+        is_ver_checked = TRUE;
+      else if (osverinfo.dwMinorVersion == minor)
+        if (osverinfo.wServicePackMajor >= spver)
           is_ver_checked = TRUE;
+    }
 
   /* Check OS Type */
   if (is_ver_checked)


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