• Arnaldo Carvalho de Melo's avatar
    perf trace: Fix build when DWARF unwind isn't available · ccd62a89
    Arnaldo Carvalho de Melo authored
    The variable is initialized and then conditionally set to a different
    value, but not used when DWARF unwinding is not available, bummer, write
    1000 times: "Run make -C tools/perf build-test"...
    
      builtin-trace.c: In function ‘cmd_trace’:
      builtin-trace.c:3112:6: error: variable ‘max_stack_user_set’ set but not
      used [-Werror=unused-but-set-variable]
        bool max_stack_user_set = true;
            ^
      cc1: all warnings being treated as err
    
    Fix it by marking it as __maybe_unused.
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Milian Wolff <milian.wolff@kdab.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Wang Nan <wangnan0@huawei.com>
    Fixes: 05614993 ("perf trace: Make --(min,max}-stack imply "--call-graph dwarf"")
    Link: http://lkml.kernel.org/n/tip-85r40c5hhv6jnmph77l1hgsr@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    ccd62a89
builtin-trace.c 91 KB