1fcd61
From de1c35857ee803653d3ffd94eb5d3f3b45ab000e Mon Sep 17 00:00:00 2001
1fcd61
From: Peter Jones <pjones@redhat.com>
1fcd61
Date: Wed, 2 Mar 2011 11:29:28 -0500
1fcd61
Subject: [PATCH] Don't ignore fwrite's return since we build with -Wno-unused.
1fcd61
1fcd61
---
1fcd61
 util/grub-mklayout.c |    7 ++++---
1fcd61
 1 files changed, 4 insertions(+), 3 deletions(-)
1fcd61
1fcd61
diff --git a/util/grub-mklayout.c b/util/grub-mklayout.c
1fcd61
index 04501cb..beea3eb 100644
1fcd61
--- a/util/grub-mklayout.c
1fcd61
+++ b/util/grub-mklayout.c
1fcd61
@@ -324,6 +324,7 @@ write_file (FILE *out, struct grub_keyboard_layout *layout)
1fcd61
 {
1fcd61
   grub_uint32_t version;
1fcd61
   unsigned i;
1fcd61
+  int rc;
1fcd61
 
1fcd61
   version = grub_cpu_to_le32 (GRUB_KEYBOARD_LAYOUTS_VERSION);
1fcd61
   
1fcd61
@@ -342,10 +343,10 @@ write_file (FILE *out, struct grub_keyboard_layout *layout)
1fcd61
     layout->keyboard_map_shift_l3[i]
1fcd61
       = grub_cpu_to_le32(layout->keyboard_map_shift_l3[i]);
1fcd61
 
1fcd61
-  fwrite (GRUB_KEYBOARD_LAYOUTS_FILEMAGIC, 1,
1fcd61
+  rc = fwrite (GRUB_KEYBOARD_LAYOUTS_FILEMAGIC, 1,
1fcd61
 	  GRUB_KEYBOARD_LAYOUTS_FILEMAGIC_SIZE, out);
1fcd61
-  fwrite (&version, sizeof (version), 1, out);
1fcd61
-  fwrite (layout, 1, sizeof (*layout), out);
1fcd61
+  rc = fwrite (&version, sizeof (version), 1, out);
1fcd61
+  rc = fwrite (layout, 1, sizeof (*layout), out);
1fcd61
 }
1fcd61
 
1fcd61
 static void
1fcd61
-- 
1fcd61
1.7.3.1
1fcd61
1fcd61
diff --git a/util/grub-menulst2cfg.c b/util/grub-menulst2cfg.c
1fcd61
index 513af47..308f8e9 100644
1fcd61
--- a/util/grub-menulst2cfg.c
1fcd61
+++ b/util/grub-menulst2cfg.c
1fcd61
@@ -34,6 +34,7 @@ main (int argc, char **argv)
1fcd61
   size_t bufsize = 0;
1fcd61
   char *suffix = xstrdup ("");
1fcd61
   int suffixlen = 0;
1fcd61
+  int rc;
1fcd61
 
1fcd61
   if (argc >= 2 && argv[1][0] == '-')
1fcd61
     {
1fcd61
@@ -111,7 +112,7 @@ main (int argc, char **argv)
1fcd61
   if (entryname)
1fcd61
     fprintf (out, "}\n\n");
1fcd61
 
1fcd61
-  fwrite (suffix, 1, suffixlen, out);
1fcd61
+  rc = fwrite (suffix, 1, suffixlen, out);
1fcd61
 
1fcd61
   free (buf);
1fcd61
   free (suffix);