warning removal changes
Joel Sherrill
joel.sherrill at oarcorp.com
Mon Sep 11 17:35:36 UTC 2006
Jerry Needell wrote:
> Joel - changing the unint32_t's to int32_t did the trick - the diff is
> attached.
Committed. I was in a mindset where anything that looked like a length
needed to be unsigned. I suspect that it only is sum that has to be signed
but am willing to stop here since it works. :)
Thanks.
-joel
> - Jerry
> Joel Sherrill wrote:
>
>> Jerry Needell wrote:
>>
>>> Joel - Just a heads-up while I keep debugging. Your "clean-up" broke
>>> something in cpukit/libnetworking/netinet/in_cksum.c for the sparc
>>> leon3 bsp.
>>> When I tried to use the etherenet driver, it would hang in an
>>> infinite loop in in_cksum.c. I mad a few quick changes to "undo"
>>> your recent modifications and everything works fine. I'm trying to
>>> understand why but I thought I'd let you know. Maybe the culprit
>>> will leap out at you.
>>
>> There were two CVS commits. From 1.11 -> 1.12, the change was from
>> an int cast to
>> (intptr_t) around line 120. I doubt that broke it.
>>
>> From 1.10-> 1.11, I see that I changed two things. I added "L" onto
>> the 65535's
>> in ADDCARRY. I doubt that broke anything. But later in the file, I
>> changed some ints
>> to uint32_t's. Can you try changing those back to int32_t?
>>
>> cvs diff -r 1.10 -r 1.11 -u in_cksum.c
>>
>> to see the change. It almost has to be adding the unsigned.
>>
>> Let me know what works and post the diff. There wasn't much changed.
>>
>> --joel
>>
>>>
>>> - Jerry
>>> Joel Sherrill wrote:
>>>
>>>> Hi,
>>>>
>>>> I have made numerous hopefully safe changes to eliminate
>>>> warnings over the past few days. My goal was to significantly
>>>> reduce the number of warnings on 16-bit targets but since
>>>> all the code in question was target independent, it impacted
>>>> other targets. I eliminated over 1000 warnings for h8300/multilib
>>>> and about 1/2 for sparc/erc32.
>>>> Please update your tree and test. If you see problems or
>>>> have fixes for other warnings, please help.
>>>>
>>>> We are primarily dealing with 16/32 bit integer issues and
>>>> pointer mangling that gcc doesn't like. I would like to
>>>> be warning free. :)
>>>>
>>>> Thanks.
>>>>
>>>> --joel
>>>
>>>
>>>
>
> ------------------------------------------------------------------------
>
> Index: in_cksum.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/cpukit/libnetworking/netinet/in_cksum.c,v
> retrieving revision 1.12
> diff -u -r1.12 in_cksum.c
> --- in_cksum.c 1 Sep 2006 19:10:00 -0000 1.12
> +++ in_cksum.c 11 Sep 2006 17:18:40 -0000
> @@ -78,8 +78,8 @@
> register uint32_t len;
> {
> register u_short *w;
> - register uint32_t sum = 0;
> - register uint32_t mlen = 0;
> + register int32_t sum = 0;
> + register int32_t mlen = 0;
> int byte_swapped = 0;
>
> union {
>
More information about the users
mailing list