mbox series

[ovs-dev,v2,0/5] Fix some of Clang's static analyzer warnings.

Message ID 169807091380.1031379.16553136292085455374.stgit@ebuild
Headers show
Series Fix some of Clang's static analyzer warnings. | expand

Message

Eelco Chaudron Oct. 23, 2023, 2:21 p.m. UTC
This series fixes some of Clang's scan-build warnings reported.

v2:
   - Split patch two into two, i.e. put the actual fix in a separate patch.
   - Updated commit messages.

Eelco Chaudron (5):
      general: Fix Clang's static analyzer 'Dead initialization' warnings.
      general: Fix Clang's static analyzer 'Dead assignment' warnings.
      ofp-table: Fix count_common_prefix_run() function.
      ovsdb: Fix Clang's static analyzer 'func null dereference' warnings.
      netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings.


 lib/dpif-netdev.c       |  4 ++++
 lib/meta-flow.c         |  4 ++--
 lib/netdev-offload.c    |  3 ++-
 lib/ofp-actions.c       |  8 +++++---
 lib/ofp-monitor.c       |  2 +-
 lib/ofp-table.c         |  2 +-
 ovsdb/mutation.c        | 14 ++++++++++++--
 tests/test-id-fpool.c   |  2 +-
 tests/test-mpsc-queue.c |  2 +-
 9 files changed, 29 insertions(+), 12 deletions(-)

Comments

Ilya Maximets Oct. 27, 2023, 9:36 a.m. UTC | #1
On 10/23/23 16:21, Eelco Chaudron wrote:
> This series fixes some of Clang's scan-build warnings reported.
> 
> v2:
>    - Split patch two into two, i.e. put the actual fix in a separate patch.
>    - Updated commit messages.
> 
> Eelco Chaudron (5):
>       general: Fix Clang's static analyzer 'Dead initialization' warnings.
>       general: Fix Clang's static analyzer 'Dead assignment' warnings.
>       ofp-table: Fix count_common_prefix_run() function.
>       ovsdb: Fix Clang's static analyzer 'func null dereference' warnings.
>       netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings.
> 
> 
>  lib/dpif-netdev.c       |  4 ++++
>  lib/meta-flow.c         |  4 ++--
>  lib/netdev-offload.c    |  3 ++-
>  lib/ofp-actions.c       |  8 +++++---
>  lib/ofp-monitor.c       |  2 +-
>  lib/ofp-table.c         |  2 +-
>  ovsdb/mutation.c        | 14 ++++++++++++--
>  tests/test-id-fpool.c   |  2 +-
>  tests/test-mpsc-queue.c |  2 +-
>  9 files changed, 29 insertions(+), 12 deletions(-)

Thanks, Eelco!  For the set:

Acked-by: Ilya Maximets <i.maximets@ovn.org>

Best regards, Ilya Maximets.
Simon Horman Oct. 31, 2023, 3:21 p.m. UTC | #2
On Mon, Oct 23, 2023 at 04:21:53PM +0200, Eelco Chaudron wrote:
> This series fixes some of Clang's scan-build warnings reported.
> 
> v2:
>    - Split patch two into two, i.e. put the actual fix in a separate patch.
>    - Updated commit messages.
> 
> Eelco Chaudron (5):
>       general: Fix Clang's static analyzer 'Dead initialization' warnings.
>       general: Fix Clang's static analyzer 'Dead assignment' warnings.
>       ofp-table: Fix count_common_prefix_run() function.
>       ovsdb: Fix Clang's static analyzer 'func null dereference' warnings.
>       netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings.

Thanks Eelco,

I've applied this series.

I have also backported the following:

1. "netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings."
   back to branch-2.17
2. "ofp-table: Fix count_common_prefix_run() function." back to branch-2.16

I also prepared backports of 2. for branch-2.14 and branch-2.15,
However, I have not pushed them as I see CI failures
with those branches without any new patches applied [2.14, 2.15].

2.14: https://github.com/horms/ovs/actions/runs/6695003077
2.15: https://github.com/horms/ovs/actions/runs/6695011034
Ilya Maximets Oct. 31, 2023, 4:24 p.m. UTC | #3
On 10/31/23 16:21, Simon Horman wrote:
> On Mon, Oct 23, 2023 at 04:21:53PM +0200, Eelco Chaudron wrote:
>> This series fixes some of Clang's scan-build warnings reported.
>>
>> v2:
>>    - Split patch two into two, i.e. put the actual fix in a separate patch.
>>    - Updated commit messages.
>>
>> Eelco Chaudron (5):
>>       general: Fix Clang's static analyzer 'Dead initialization' warnings.
>>       general: Fix Clang's static analyzer 'Dead assignment' warnings.
>>       ofp-table: Fix count_common_prefix_run() function.
>>       ovsdb: Fix Clang's static analyzer 'func null dereference' warnings.
>>       netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings.
> 
> Thanks Eelco,
> 
> I've applied this series.
> 
> I have also backported the following:
> 
> 1. "netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings."
>    back to branch-2.17
> 2. "ofp-table: Fix count_common_prefix_run() function." back to branch-2.16
> 
> I also prepared backports of 2. for branch-2.14 and branch-2.15,
> However, I have not pushed them as I see CI failures
> with those branches without any new patches applied [2.14, 2.15].
> 
> 2.14: https://github.com/horms/ovs/actions/runs/6695003077
> 2.15: https://github.com/horms/ovs/actions/runs/6695011034
> 

Branched below 2.17 are EOL.  There is no need to backport.
Basically, branch-2.17 is the oldest supported branch now.

Best regards, Ilya Maximets.