]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
perf symbols: dso->name is an array, no need to check it against NULL
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 13 Feb 2017 20:11:03 +0000 (17:11 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 13 Feb 2017 20:22:35 +0000 (17:22 -0300)
commit5eae7d842510d33d4410c062280eda6c935403dd
tree3761779adda8056d41ac3d203e2a9be1194d9db8
parent9ef6839bcce7ca944c1ace4a7247cf13ca92a28f
perf symbols: dso->name is an array, no need to check it against NULL

As it will always evaluate to 'true', as reported by clang:

  util/map.c:390:36: error: address of array 'map->dso->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
          if (map && map->dso && (map->dso->name || map->dso->long_name)) {
                                  ~~~~~~~~~~^~~~ ~~
  util/map.c:393:22: error: address of array 'map->dso->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                  else if (map->dso->name)
                     ~~  ~~~~~~~~~~^~~~

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-x8cu007cly40kfp8xnpi9kya@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/map.c
tools/perf/util/scripting-engines/trace-event-perl.c