From patchwork Thu Nov 13 11:16:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 40739 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB86B240ED for ; Thu, 13 Nov 2014 11:17:10 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id x13sf7757573wgg.5 for ; Thu, 13 Nov 2014 03:17:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=1Lf/li46r+o+X0IZIcDSyFjmpL0QpEv77tEYMfzjnoI=; b=FkX1BtXy80QtVyoLvf9RjtN8pIlPnvWd55r3KfmykIBhdehBrcne6V4XvK2ILPcBs3 cKR6Een0WVVTHEhx/muFNSy3LKlBAwCAFEtXkWVM3mdjDrTlm74ccJ7UCTGUxNMXce9E ELlimbw3esYxcx7TAk897dmU2UxKk8ROwSrMP41UK2sbsf3NWHHdsYM4hgojzYGtTIzS c8r3XtBXk+LXLqpugYBoNoStWs4PGsP4LOX70BkclTdP/w9/ypbmyAZTt7Pf9MTvv42s FQOqjN7+PA3AqudwaUEK29mt0twXB4+BkTqwIgJcCzTIYCK25Nkp8dqwyzYh7pgMFPCt bpyA== X-Gm-Message-State: ALoCoQmmpDZNpr6jbSix1d5kUUBp2IXbSVKVTFbW4IURpN6A5qYczi5klKpRjetSlDK5L3Z/WMp9 X-Received: by 10.112.247.74 with SMTP id yc10mr8972530lbc.8.1415877429718; Thu, 13 Nov 2014 03:17:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.72 with SMTP id q8ls632761laq.98.gmail; Thu, 13 Nov 2014 03:17:09 -0800 (PST) X-Received: by 10.152.207.7 with SMTP id ls7mr1810903lac.9.1415877429286; Thu, 13 Nov 2014 03:17:09 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id y9si38202899lbr.1.2014.11.13.03.17.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 03:17:09 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gf13so1054084lab.41 for ; Thu, 13 Nov 2014 03:17:09 -0800 (PST) X-Received: by 10.152.29.8 with SMTP id f8mr1818335lah.56.1415877429207; Thu, 13 Nov 2014 03:17:09 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp572483lbc; Thu, 13 Nov 2014 03:17:08 -0800 (PST) X-Received: by 10.107.8.213 with SMTP id h82mr978331ioi.84.1415877427827; Thu, 13 Nov 2014 03:17:07 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id x11si39409439iod.19.2014.11.13.03.17.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Nov 2014 03:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XosOX-0001kU-Ou; Thu, 13 Nov 2014 11:16:57 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XosOW-0001kO-LP for edk2-devel@lists.sourceforge.net; Thu, 13 Nov 2014 11:16:56 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=lersek@redhat.com; helo=mx1.redhat.com; Received: from mx1.redhat.com ([209.132.183.28]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XosOU-0004zw-OO for edk2-devel@lists.sourceforge.net; Thu, 13 Nov 2014 11:16:56 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sADBGmXS013026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 13 Nov 2014 06:16:48 -0500 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sADBGTn5018997 for ; Thu, 13 Nov 2014 06:16:47 -0500 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net Date: Thu, 13 Nov 2014 12:16:25 +0100 Message-Id: <1415877385-18341-8-git-send-email-lersek@redhat.com> In-Reply-To: <1415877385-18341-1-git-send-email-lersek@redhat.com> References: <1415877385-18341-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -2.5 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1XosOU-0004zw-OO Subject: [edk2] [PATCH v2 7/7] CryptoPkg: OpenSslSupport.h: edk2-ize offsetof() macro for gcc-4.8 / X64 X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lersek@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Code added in SVN r16339 ("CryptoPkg Updates to support RFC3161 timestamp signature verification.") introduced many new uses of the offsetof() macro. Since the offsetof() macro in "OpenSslSupport.h" casts a pointer to an "int", it triggers a large number of error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] errors when building CryptoPkg with gcc-4.8 for X64. Remedy this by directing offsetof() to the OFFSET_OF() macro in "MdePkg/Include/Base.h" (which matches how "OpenSslSupport.h" resolves the va_*() macros too). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- CryptoPkg/Include/OpenSslSupport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CryptoPkg/Include/OpenSslSupport.h b/CryptoPkg/Include/OpenSslSupport.h index 33eda7d..ed889e9 100644 --- a/CryptoPkg/Include/OpenSslSupport.h +++ b/CryptoPkg/Include/OpenSslSupport.h @@ -72,7 +72,7 @@ typedef VOID *FILE; portably, hence it is provided by a Standard C header file. For pre-Standard C compilers, here is a version that usually works (but watch out!): */ -#define offsetof(type, member) ( (int) & ((type*)0) -> member ) +#define offsetof(type, member) OFFSET_OF (type, member) // // Basic types from EFI Application Toolkit required to buiild Open SSL