Re: [PATCH] libmlx4: Fix a compiler warning

2012-04-02 Thread Bart Van Assche
. Please replace by the patch below: [PATCH] libmlx4: Fix a compiler warning Avoid that link_local_gid() triggers the following compiler warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Bart Van Assche bvanass...@acm.org --- configure.in |9

Re: [PATCH] libmlx4: Fix a compiler warning

2012-04-01 Thread Bart Van Assche
; + uint32_t hi = gid-u32[0]; + uint32_t lo = gid-u32[1]; Thanks, however I like to keep libmlx4 backwards compatible if possible. So we can't do this unconditionally. How about the patch below ? [PATCH] libmlx4: Fix a compiler warning Avoid that link_local_gid() triggers the following

[PATCH] libmlx4: Fix a compiler warning

2011-10-10 Thread Bart Van Assche
Avoid that link_local_gid() triggers the following compiler warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Bart Van Assche bvanass...@acm.org --- src/verbs.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/verbs.c

Re: [PATCH] libmlx4: Fix a compiler warning

2011-10-10 Thread Roland Dreier
On Mon, Oct 10, 2011 at 10:47 AM, Bart Van Assche bvanass...@acm.org wrote: -       uint32_t hi = *(uint32_t *)(gid-raw); -       uint32_t lo = *(uint32_t *)(gid-raw + 4); -       if (hi == htonl(0xfe80) lo == 0) -               return 1; +       uint32_t hi = gid-u32[0]; +