* [PATCH] perfcounter: fix warn_unused_result warnings in perfcounter utils
@ 2009-06-04 20:15 Frederic Weisbecker
0 siblings, 0 replies; only message in thread
From: Frederic Weisbecker @ 2009-06-04 20:15 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Peter Zijlstra, Mike Galbraith, Paul Mackerras,
Corey Ashford, Marcelo Tosatti, Arnaldo Carvalho de Melo,
Frederic Weisbecker
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@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-04 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-04 20:15 [PATCH] perfcounter: fix warn_unused_result warnings in perfcounter utils Frederic Weisbecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®