lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 27 Aug 2012 15:38:26 +0800 From: Feng Tang <feng.tang@...el.com> To: acme@...hat.com Cc: mingo@...e.hu, a.p.zijlstra@...llo.nl, namhyung@...nel.org, dsahern@...il.com, linux-kernel@...r.kernel.org, Feng Tang <feng.tang@...el.com> Subject: [PATCH 2/3] Perf tools: Fix a compiling error in util/map.c This patch fix a compile warning taken as error: CC util/map.o cc1: warnings being treated as errors util/map.c: In function ‘map__fprintf_dsoname’: util/map.c:240: error: ‘dsoname’ may be used uninitialized in this function make: *** [util/map.o] Error 1 Signed-off-by: Feng Tang <feng.tang@...el.com> --- tools/perf/util/map.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 7d37159..5f90dda 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -237,15 +237,14 @@ size_t map__fprintf(struct map *self, FILE *fp) size_t map__fprintf_dsoname(struct map *map, FILE *fp) { - const char *dsoname; + const char *dsoname = "[unknown]"; if (map && map->dso && (map->dso->name || map->dso->long_name)) { if (symbol_conf.show_kernel_path && map->dso->long_name) dsoname = map->dso->long_name; else if (map->dso->name) dsoname = map->dso->name; - } else - dsoname = "[unknown]"; + } return fprintf(fp, "%s", dsoname); } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists