[ovs-git] [openvswitch/ovs] 491fdb: ovsdb-idlc: Use ALIGNED_CAST to avoid spurious war...

GitHub noreply at github.com
Tue Sep 18 05:00:42 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 491fdb0e712d98bc60c60bd2d464b43164853c2d
      https://github.com/openvswitch/ovs/commit/491fdb0e712d98bc60c60bd2d464b43164853c2d
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-09-17 (Mon, 17 Sep 2018)

  Changed paths:
    M ovsdb/ovsdb-idlc.in

  Log Message:
  -----------
  ovsdb-idlc: Use ALIGNED_CAST to avoid spurious warnings for index rows.

The *_index_init_row() function casts a generic ovsdb_idl_row pointer to
a specific type of row pointer.  This can cause an increase in required
alignment with some kinds of data on some architectures.  GCC complains,
e.g.:

    lib/vswitch-idl.c: In function 'ovsrec_flow_sample_collector_set_index_init_row'
    lib/vswitch-idl.c:9277:12: warning: cast increases required alignment of target

However, rows are always allocated with malloc(), which returns member
suitable for any type, so this is a false positive warning and this commit
suppresses it.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Han Zhou <zhouhan at gmail.com>



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list