Bug 4171 - makedevs-unused-but-set-variable.patch
Summary: makedevs-unused-but-set-variable.patch
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2010.11
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 4375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-09 23:16 UTC by Hector Oron
Modified: 2011-10-23 17:50 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***