[ovs-git] Open vSwitch: ofproto-dpif: Fix GCC warning. (master)

dev at openvswitch.org dev at openvswitch.org
Mon Jan 2 20:47:24 UTC 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  4dd1e3cabbd109e322553a7b3d4c875e697d2069 (commit)
      from  968131c18090916ec30738d1ff8c1725bb744a30 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4dd1e3cabbd109e322553a7b3d4c875e697d2069
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=4dd1e3cabbd109e322553a7b3d4c875e697d2069
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Fix GCC warning.
		
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) warned:

    ofproto/ofproto-dpif.c: In function 'bundle_send_learning_packets':
    ofproto/ofproto-dpif.c:1835: warning: dereferencing type-punned pointer
    will break strict-aliasing rules

I agree that its analysis matches what the C standard says.  This commit
fixes the problem and avoids the warning.

The assignment to 'port' isn't actually necessary.  I included it because
I like to have a variable with the correct type near the use of that type
through a "void *".  Then "grep" for that type is more effective, and the
compiler will be able to diagnose any later change to (in this case) the
type of the first parameter to send_packet().

Signed-off-by: Ben Pfaff <blp at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 ofproto/ofproto-dpif.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list