[gobject-introspection] tests: Avoid global variable shadowing local



commit 37a82fef7b1a242fb61fa15fbc9761134966580b
Author: Philip Chimento <philip endlessm com>
Date:   Sun Mar 11 22:38:33 2018 -0700

    tests: Avoid global variable shadowing local
    
    This will otherwise warn.

 tests/scanner/regress.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 658f382c..c9e39378 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -292,7 +292,7 @@ regress_test_int_value_arg(const GValue *v)
   return i;
 }
 
-static GValue value;
+static GValue global_value;
 /**
  * regress_test_value_return:
  * @i: an int
@@ -302,12 +302,12 @@ static GValue value;
 const GValue *
 regress_test_value_return(int i)
 {
-  memset(&value, '\0', sizeof(GValue));
+  memset(&global_value, '\0', sizeof(GValue));
 
-  g_value_init (&value, G_TYPE_INT);
-  g_value_set_int (&value, i);
+  g_value_init (&global_value, G_TYPE_INT);
+  g_value_set_int (&global_value, i);
 
-  return &value;
+  return &global_value;
 }
 
 /************************************************************************/


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