From patchwork Mon Oct 12 16:06:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 53157 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9CGAUoo028332 for ; Mon, 12 Oct 2009 16:10:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932718AbZJLQE5 (ORCPT ); Mon, 12 Oct 2009 12:04:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932721AbZJLQE5 (ORCPT ); Mon, 12 Oct 2009 12:04:57 -0400 Received: from mail-bw0-f210.google.com ([209.85.218.210]:53027 "EHLO mail-bw0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932718AbZJLQE4 (ORCPT ); Mon, 12 Oct 2009 12:04:56 -0400 Received: by bwz6 with SMTP id 6so3218147bwz.37 for ; Mon, 12 Oct 2009 09:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :subject:message-id:mime-version:content-type:content-disposition :user-agent; bh=AgkDMw0XNIiFnF15aKQ9uoCAb/0Sq9JC5k5CbFqXYbM=; b=gBiIgNSBgS6wjm783V7uxLh3lwcvsvzz7DdeNrA8z8tXF+QvYIgODm9+J1cZWZrL5b DZ9d/xb4AZ3Nn/gJGJ1dKOMbdK5A03FalrWBdeaJ7Pgp66shBbx0NtXmlAh4KwUCiTJ6 RzhjcB4lqYbIGnK2wcX28PfD/ZKD/5x5pBSy4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=nOapsjZkHM3CSumkXr9KAZxvyIcdDuF4Al8FL+ZMKSX4c1g9RBmrEn+A9UpJ75Ympo tMnyyYazPBpc+4nagAapSXR8A1Evy4n8zMKoIz3rek6CcW4BqQ5fuL/qKQL7/PTknELF QqM2DsRvnH4ItwV+odjOrAZqVV0KxsBSCVcOI= Received: by 10.103.126.7 with SMTP id d7mr2467166mun.115.1255363459185; Mon, 12 Oct 2009 09:04:19 -0700 (PDT) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id t10sm189713muh.13.2009.10.12.09.04.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Oct 2009 09:04:18 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id 9B44E12563; Mon, 12 Oct 2009 18:06:17 +0200 (IST) Date: Mon, 12 Oct 2009 18:06:17 +0200 From: Sasha Khapyorsky To: linux-rdma Subject: [PATCH] opensm: fix gcc-4.4.1 warnings Message-ID: <20091012160617.GF31778@me> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h index 25ed35f..aa566f7 100644 --- a/opensm/include/iba/ib_types.h +++ b/opensm/include/iba/ib_types.h @@ -2745,8 +2745,7 @@ ib_path_rec_init_local(IN ib_path_rec_t * const p_rec, p_rec->tclass = 0; p_rec->service_id = 0; - *((uint32_t *) p_rec->resv2) = 0; - *((uint16_t *) p_rec->resv2 + 2) = 0; + memset(p_rec->resv2, 0, sizeof(p_rec->resv2)); } /* diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c index 2b3dced..2668f0c 100644 --- a/opensm/opensm/osm_helper.c +++ b/opensm/opensm/osm_helper.c @@ -1102,8 +1102,7 @@ void osm_dump_path_record(IN osm_log_t * p_log, IN const ib_path_rec_t * p_pr, "\t\t\t\trate....................0x%X\n" "\t\t\t\tpkt_life................0x%X\n" "\t\t\t\tpreference..............0x%X\n" - "\t\t\t\tresv2...................0x%X\n" - "\t\t\t\tresv3...................0x%X\n", + "\t\t\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), @@ -1121,8 +1120,8 @@ void osm_dump_path_record(IN osm_log_t * p_log, IN const ib_path_rec_t * p_pr, 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]); } }