intel/aubinator_error_decode: mark ret as MAYBE_UNUSED in main
authorKai Wasserbäch <kai@dev.carbon-project.org>
Sat, 18 Aug 2018 11:16:10 +0000 (13:16 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 20 Aug 2018 10:08:52 +0000 (11:08 +0100)
Only used, when asserts are enabled.

Fixes an unused-but-set-variable warning with GCC 8:
 ../../../src/intel/tools/aubinator_error_decode.c: In function 'main':
 ../../../src/intel/tools/aubinator_error_decode.c:759:11: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
        int ret;
            ^~~

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/tools/aubinator_error_decode.c

index 4e3359bba9f8db6e7c83e3f9d0ed922a61120472..d7f9d9f2af1935f8dff953d70fb7781ea3110e25 100644 (file)
@@ -756,7 +756,7 @@ main(int argc, char *argv[])
       setup_pager();
 
    if (S_ISDIR(st.st_mode)) {
-      int ret;
+      MAYBE_UNUSED int ret;
       char *filename;
 
       ret = asprintf(&filename, "%s/i915_error_state", path);