This series of patches use command introduced from:
http://openvswitch.org/pipermail/dev/2016-June/073941.html
which does: 
 $scan-build -o tests/clang-analyzer-results --use-analyzer=/usr/bin/clang make
and
 $scan-view tests/clang-analyzer-results/<results>, or
 $firefox tests/clang-analyzer-results/<results>/index.html
to examine errors reported by clang.  The series address some of
the errors, others might come later.
These patches are tested-at:
    https://travis-ci.org/williamtu/ovs-travis/builds/140984638

After this series of patch, clang reports total 37 bugs:
API 
  Argument with 'nonnull' attribute passed null   11  
Logic error 
  Assigned value is garbage or undefined  2   
  Dangerous variable-length array (VLA) declaration   1   
  Dereference of null pointer 7   
  Result of operation is garbage or undefined 1   
  Uninitialized argument value    7   
  Unix API    2   
Memory Error    
  Memory leak 1   
  Use-after-free  5   

William Tu (7):
  bridge: Fix possible null pointer dereference reported by clang.
  clang: Fix dead assignment.
  netlink: Fix passing null pointer reported by clang.
  ovn-controller-vtep: Fix dead increment reported by clang.
  ovn-nbctl: Fix double memory free reported by clang.
  packets: Fix null pointer dereference reported by clang.
  ovsdb: Fix dead assignment reported by clang.

 lib/dpif-netdev.c                         | 1 -
 lib/netlink.c                             | 2 +-
 lib/packets.c                             | 2 +-
 ovn/controller-vtep/ovn-controller-vtep.c | 3 ---
 ovn/utilities/ovn-nbctl.c                 | 1 -
 ovsdb/replication.c                       | 1 +
 tests/test-ovsdb.c                        | 2 +-
 vswitchd/bridge.c                         | 2 +-
 8 files changed, 5 insertions(+), 9 deletions(-)

-- 
2.5.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to