[libglnx: 1/2] _GLNX_TEST_SCOPED_TEMP_DIR: Mark variable as G_GNUC_UNUSED



commit bc9c31f785ccb36b36ba1a53db1737d5cc7987c9
Author: Simon McVittie <smcv collabora com>
Date:   Mon Nov 11 18:34:48 2019 +0000

    _GLNX_TEST_SCOPED_TEMP_DIR: Mark variable as G_GNUC_UNUSED
    
    Otherwise, clang diagnoses it as unused. It is - deliberately - only
    allocated and cleaned up, with no other use.
    
    Signed-off-by: Simon McVittie <smcv collabora com>

 tests/libglnx-testlib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/libglnx-testlib.h b/tests/libglnx-testlib.h
index 0d3a075..d45ba86 100644
--- a/tests/libglnx-testlib.h
+++ b/tests/libglnx-testlib.h
@@ -45,4 +45,4 @@ void _glnx_test_auto_temp_dir_leave (_GLnxTestAutoTempDir *dir);
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(_GLnxTestAutoTempDir, _glnx_test_auto_temp_dir_leave);
 
 #define _GLNX_TEST_SCOPED_TEMP_DIR \
-  g_autoptr(_GLnxTestAutoTempDir) temp_dir = _glnx_test_auto_temp_dir_enter ()
+  G_GNUC_UNUSED g_autoptr(_GLnxTestAutoTempDir) temp_dir = _glnx_test_auto_temp_dir_enter ()


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