From patchwork Wed Nov 12 14:04:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 40675 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C6B0F206A5 for ; Wed, 12 Nov 2014 14:05:02 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id q1sf7767637lam.0 for ; Wed, 12 Nov 2014 06:05:01 -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=Rf06qINwsgTkkx9Eymk1hSYQq4O0zba/TnoAwvBUZpY2iGJqQABimRPbFpUl2tpu3O vovWXE+r1FPezQjFIAYjFfJ3ZgafSUZCf2QYFrGhm44YLCvXIH2mCCzJRdx45w1OJ8qp YIe1XXj5SDfdrN5rcxSBITghJL7KJc1IQoiaxeO2KhoIRhEFW3xk8widFv6OZdUJjjQE k3EQ2yPkQI8tWqcYW5kw9M6XBn69x3MjDEC63wKkZDAOKX8ajlnYCZjEuj3fi1h0LNJl TIcxb9etwTu4PjZLDHYdZzr0dJIpI/ZItX06+ZEXk+HjXCJUsRRkrr+1VmAZSvo69z87 d/Gg== X-Gm-Message-State: ALoCoQm3/wKJH7BsiyEMwanLdXbFiwA8nrQ+mwM7hfCNcUi9F8ny5tQ2HNz823uKnsxIJ3Xnet2A X-Received: by 10.112.247.74 with SMTP id yc10mr7822666lbc.8.1415801101729; Wed, 12 Nov 2014 06:05:01 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.7 with SMTP id i7ls711406lam.107.gmail; Wed, 12 Nov 2014 06:05:01 -0800 (PST) X-Received: by 10.152.8.82 with SMTP id p18mr1025193laa.25.1415801101391; Wed, 12 Nov 2014 06:05:01 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id wl2si34971077lbb.95.2014.11.12.06.05.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Nov 2014 06:05:01 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id 10so9536788lbg.28 for ; Wed, 12 Nov 2014 06:05:01 -0800 (PST) X-Received: by 10.152.29.8 with SMTP id f8mr42504786lah.56.1415801101293; Wed, 12 Nov 2014 06:05:01 -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 ew9csp428872lbc; Wed, 12 Nov 2014 06:04:59 -0800 (PST) X-Received: by 10.107.34.9 with SMTP id i9mr35650270ioi.33.1415801098963; Wed, 12 Nov 2014 06:04:58 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id z7si23689371igl.22.2014.11.12.06.04.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 12 Nov 2014 06:04:58 -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 1XoYXM-0002lJ-26; Wed, 12 Nov 2014 14:04:44 +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 1XoYXK-0002kz-E5 for edk2-devel@lists.sourceforge.net; Wed, 12 Nov 2014 14:04:42 +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 1XoYXJ-0000f6-KY for edk2-devel@lists.sourceforge.net; Wed, 12 Nov 2014 14:04:42 +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 sACE4X6b016564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Nov 2014 09:04:33 -0500 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-88.ams2.redhat.com [10.36.116.88]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sACE457V030648; Wed, 12 Nov 2014 09:04:30 -0500 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net, jordan.l.justen@intel.com, scott@notabs.org, qin.long@intel.com Date: Wed, 12 Nov 2014 15:04:01 +0100 Message-Id: <1415801041-17550-8-git-send-email-lersek@redhat.com> In-Reply-To: <1415801041-17550-1-git-send-email-lersek@redhat.com> References: <1415801041-17550-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -2.1 (--) 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 -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1XoYXJ-0000f6-KY Subject: [edk2] [PATCH 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.217.169 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