Bug 4171

Summary: makedevs-unused-but-set-variable.patch
Product: buildroot Reporter: Hector Oron <hector.oron>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: buildroot, d_mo1234
Priority: P5    
Version: 2010.11   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Hector Oron 2011-09-09 23:16:59 UTC
Hello,

  makedevs package in buildroot fails to build when `-Wunused-but-set-variable' is set in the compiler. The following patch attempts to fix this issue:


Index: buildroot-2010.11/package/makedevs/makedevs.c
===================================================================
--- buildroot-2010.11.orig/package/makedevs/makedevs.c  2011-09-09 22:33:32.948124813 +0100
+++ buildroot-2010.11/package/makedevs/makedevs.c       2011-09-09 22:33:55.044124824 +0100
@@ -531,5 +531,5 @@
        if (system("/bin/sync"))
                bb_error_msg("sync failed, continuing anyway");
 
-       return 0;
+       return ret;
 }


Best regards,
  -- Hector Oron
Comment 1 Peter Korsgaard 2011-10-09 21:27:43 UTC
Thanks. I had to apply manually as your patch was against an old BR version (/bin/sync call got removed back in March). I guess that's also the reason why you brought this up as we previously built makedevs with -Werror, which we don't do any more.
Comment 2 Danomi Mocelopolis 2011-10-23 17:50:41 UTC
*** Bug 4375 has been marked as a duplicate of this bug. ***