On Sat, Jul 23, 2011 at 10:28:52AM -0700, Ben Greear wrote: > On 07/23/2011 06:27 AM, Jose Manuel dos Santos Calhariz wrote: > > > >I am packaging xorp 1.8.3 for Debian. The default compiler is now g++ > >v4.6. This compiler is more stricter than previous versions. > > > >This g++ have one new warnings: > > > > -Wunused-but-set-variable > > > >This warning when used with -Werror causes a fail to build. The > >position on Debian is to fix the problems on the source code instead > >of using the flag -Wno-error=unused-but-set-variable for disabling the > >warning. > > > >I am asking if this problem is solved in the git repository or if will > >be fixed in the near future. Maybe this is a simple fix and is enough > >to comment out the affected variables. > > Some may be solved in git, and if not, patches are welcome.
Here goes a draft of the patches. This page explains the warning and how to solve it http://lists.fedoraproject.org/pipermail/devel/2011-February/148523.html For solving the errors, I have used various strategies: - Looks to be old forgotten code, so I commented the variable definition. - Variable and the the code looks to do nothing, so I commented everything. - The variable is not used because of a #ifdef, so I put the same #ifdef around the variable. - The variable is not used because of a macro, so I used "__attribute__((__unused__))" in the definition of it. - The function that calculates the value of the variable may have side effects, so I used "__attribute__((__unused__))" I am not familiar with the xorp code and my c++ skills are very rusty, so most probably I missed something. I looked into git hub, but the code looked to be the same in the affected areas. In attach follows a tar file with the patches. The resulting code compiles, but I have not run the compiled binary. Jose Calhariz > > Thanks, > Ben > -- -- Volto atrás, sim. Com o erro não há compromisso --Juscelino Kubitschek
ftbfs_gcc-4.6.tar
Description: Unix tar archive
_______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
