From: Hal Rosenstock <hnrose-Wuw85uim5zDR7s880joybQ@public.gmane.org>
To: sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] infiniband-diags/saquery.c: Modify dump_path_record
Date: Tue, 13 Oct 2009 09:04:54 -0400 [thread overview]
Message-ID: <20091013130454.GA20198@comcast.net> (raw)
Similar to commit 27ea3c85500f7eff741c93e662a344742dbbea13
to fix gcc-4.4.1 warnings
Fix "dereferencing type-punned pointer will break strict-aliasing rules"
warning catched by gcc-4.4.1.
Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/infiniband-diags/src/saquery.c b/infiniband-diags/src/saquery.c
index d880261..6c44b63 100644
--- a/infiniband-diags/src/saquery.c
+++ b/infiniband-diags/src/saquery.c
@@ -312,8 +312,7 @@ static void dump_path_record(void *data)
"\t\trate....................0x%X\n"
"\t\tpkt_life................0x%X\n"
"\t\tpreference..............0x%X\n"
- "\t\tresv2...................0x%X\n"
- "\t\tresv3...................0x%X\n",
+ "\t\tresv2...................0x%02X%02X%02X%02X%02X%02X\n",
cl_ntoh64(p_pr->service_id),
inet_ntop(AF_INET6, p_pr->dgid.raw, gid_str, sizeof gid_str),
inet_ntop(AF_INET6, p_pr->sgid.raw, gid_str2, sizeof gid_str2),
@@ -322,7 +321,8 @@ static void dump_path_record(void *data)
cl_ntoh16(p_pr->pkey), ib_path_rec_qos_class(p_pr),
ib_path_rec_sl(p_pr), p_pr->mtu, p_pr->rate, p_pr->pkt_life,
p_pr->preference,
- *(uint32_t *) & p_pr->resv2, *((uint16_t *) & p_pr->resv2 + 2));
+ p_pr->resv2[0], p_pr->resv2[1], p_pr->resv2[2],
+ p_pr->resv2[3], p_pr->resv2[4], p_pr->resv2[5]);
}
static void dump_class_port_info(void *data)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2009-10-13 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 13:04 Hal Rosenstock [this message]
[not found] ` <20091013130454.GA20198-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-10-13 17:57 ` [PATCH] infiniband-diags/saquery.c: Modify dump_path_record Sasha Khapyorsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091013130454.GA20198@comcast.net \
--to=hnrose-wuw85uim5zdr7s880joybq@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.