[PATCH 05/20] libchip/serial/z85c30.c: Remove redundant assignment

Joel Sherrill joel.sherrill at oarcorp.com
Wed Nov 26 15:24:24 UTC 2014


On 11/26/2014 09:12 AM, Gedare Bloom wrote:
> To be clear, I meant the commit comment. Obviously don't add a source
> comment about a deleted line.
>
OK. Gotcha. These are pretty obvious from the CodeSonar report.

And I don't think we have anymore of these.

The biggest category left is possible NULL dereferences. Some will
be best addressed with _Assert() to document and enforce an
assumption. Some are bugs that obviously are unlikely to get hit.
> On Wed, Nov 26, 2014 at 10:11 AM, Gedare Bloom<gedare at rtems.org>  wrote:
>> In the future, please add more in the comment to explain for example
>> that the same variable initialization happens earlier. I had to go
>> look at the code to see why it was OK to delete this line.
>> -Gedare
>>
>> On Tue, Nov 25, 2014 at 6:02 PM, Joel Sherrill
>> <joel.sherrill at oarcorp.com>  wrote:
>>> From: Josh Oguin<josh.oguin at oarcorp.com>
>>>
>>> This was flagged by CodeSonar.
>>> ---
>>>   c/src/libchip/serial/z85c30.c | 1 -
>>>   1 file changed, 1 deletion(-)
>>>
>>> diff --git a/c/src/libchip/serial/z85c30.c b/c/src/libchip/serial/z85c30.c
>>> index 1f43271..7c55a51 100644
>>> --- a/c/src/libchip/serial/z85c30.c
>>> +++ b/c/src/libchip/serial/z85c30.c
>>> @@ -269,7 +269,6 @@ Z85C30_STATIC void z85c30_init(int minor)
>>>
>>>     pz85c30Context->ucModemCtrl = SCC_WR5_TX_8_BITS | SCC_WR5_TX_EN;
>>>
>>> -  ulCtrlPort = Console_Port_Tbl[minor]->ulCtrlPort1;
>>>     if ( ulCtrlPort == Console_Port_Tbl[minor]->ulCtrlPort2 ) {
>>>       /*
>>>        * This is channel A
>>> --
>>> 1.9.3
>>>
>>> _______________________________________________
>>> devel mailing list
>>> devel at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel




More information about the devel mailing list