[Xorp-hackers] Compiling xorp 1.8.3 for Debian using g++-4.6
Ben Greear
greearb at candelatech.com
Mon Jul 25 10:07:52 PDT 2011
On 07/25/2011 10:05 AM, Jose Manuel dos Santos Calhariz wrote:
> On Sun, Jul 24, 2011 at 11:02:34PM +0100, Jose Manuel dos Santos Calhariz wrote:
>> 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.
>
> I missed a warning/error on file contrib/olsr/face_manager.cc. Here
> goes an update to one of the patches.
Thanks for these. It will probably be a day or two before I can review
and apply them, but I'll try to get on it quickly.
Thanks,
Ben
>
>>
>> Jose Calhariz
>>
>>>
>>> Thanks,
>>> Ben
>>>
>>
>
> Jose Calhariz
>
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Xorp-hackers
mailing list