aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-06-04 16:15:58 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-04 16:46:40 -0400
commit76a0f40fd6eff1bce3b91925cea7587b3399fe80 (patch)
tree39e015ad97af7eb4f6873cd2a8999f32c7432d8e
parent9ac995457b2a148ed9bb8860e8b7cb869327b102 (diff)
perf_counter tools: Fix warn_unused_result warnings
Fix warnings for return values that we don't care about: 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> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1244146558-8635-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--Documentation/perf_counter/util/quote.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/perf_counter/util/quote.c b/Documentation/perf_counter/util/quote.c
index 7a49fcf69671..f18c5212bc92 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,
201 } while (0) 201 } while (0)
202#define EMITBUF(s, l) \ 202#define EMITBUF(s, l) \
203 do { \ 203 do { \
204 int __ret; \
204 if (sb) strbuf_add(sb, (s), (l)); \ 205 if (sb) strbuf_add(sb, (s), (l)); \
205 if (fp) fwrite((s), (l), 1, fp); \ 206 if (fp) __ret = fwrite((s), (l), 1, fp); \
206 count += (l); \ 207 count += (l); \
207 } while (0) 208 } while (0)
208 209
@@ -287,7 +288,9 @@ extern void write_name_quotedpfx(const char *pfx, size_t pfxlen,
287 quote_c_style(name, NULL, fp, 1); 288 quote_c_style(name, NULL, fp, 1);
288 fputc('"', fp); 289 fputc('"', fp);
289 } else { 290 } else {
290 fwrite(pfx, pfxlen, 1, fp); 291 int ret;
292
293 ret = fwrite(pfx, pfxlen, 1, fp);
291 fputs(name, fp); 294 fputs(name, fp);
292 } 295 }
293 fputc(terminator, fp); 296 fputc(terminator, fp);