[PATCH] perfcounter: fix warn_unused_result warnings in perfcounter utils

From: Frederic Weisbecker
Date: Thu Jun 04 2009 - 16:16:20 EST


Fix warnings for return values that we don't care.

util/quote.c:222: attention : ignoring return value of âfwriteâ, declared with attribute warn_unused_result
util/quote.c:235: attention : ignoring return value of âfwriteâ, declared with attribute warn_unused_result
util/quote.c: In function âwrite_name_quotedpfxâ:
util/quote.c:290: attention : ignoring return value of âfwriteâ, declared with attribute warn_unused_result

Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
Cc: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
Documentation/perf_counter/util/quote.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/perf_counter/util/quote.c b/Documentation/perf_counter/util/quote.c
index 7a49fcf..f18c521 100644
--- a/Documentation/perf_counter/util/quote.c
+++ b/Documentation/perf_counter/util/quote.c
@@ -201,8 +201,9 @@ static size_t quote_c_style_counted(const char *name, ssize_t maxlen,
} while (0)
#define EMITBUF(s, l) \
do { \
+ int __ret; \
if (sb) strbuf_add(sb, (s), (l)); \
- if (fp) fwrite((s), (l), 1, fp); \
+ if (fp) __ret = fwrite((s), (l), 1, fp); \
count += (l); \
} while (0)

@@ -287,7 +288,9 @@ extern void write_name_quotedpfx(const char *pfx, size_t pfxlen,
quote_c_style(name, NULL, fp, 1);
fputc('"', fp);
} else {
- fwrite(pfx, pfxlen, 1, fp);
+ int ret;
+
+ ret = fwrite(pfx, pfxlen, 1, fp);
fputs(name, fp);
}
fputc(terminator, fp);
--
1.6.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/