From patchwork Tue Jul 21 03:23:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 497984 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DC4E8140DBC for ; Tue, 21 Jul 2015 13:23:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=mxK+tTte; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id B797D1A0F8E for ; Tue, 21 Jul 2015 13:23:41 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=mxK+tTte; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 5F5B51A019D for ; Tue, 21 Jul 2015 13:23:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=mxK+tTte; dkim-atps=neutral Received: by pabkd10 with SMTP id kd10so39347510pab.2 for ; Mon, 20 Jul 2015 20:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=0OLy7ShqZ0czQ9p8LoVWtXy5ndjcCFJ6ou+lg6l3n7w=; b=mxK+tTteHegZ1IQJZSzZxMFTHQzZ7kXbfN05sjFkMh7HK9xVjbyMLdYmZ30gqY7kD5 PxqNEK+1E/6N//GVJGPX1y2LjPr0+lPtWvD1mCGM7Xb2iDKu41yYDKLSkx/71Lnub2dx QsoP+4xmihnOkaZDJdAjr3gF8Ylhx6uTGlHHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=0OLy7ShqZ0czQ9p8LoVWtXy5ndjcCFJ6ou+lg6l3n7w=; b=OhHawG6zByZf+jebQbS3rU2tmnqjqu7E/REhqdtjfopa/adoqSdieRuufd6nE/DcaO g0MSCuC0HeQ2vzEiQIjpzPPnXDvIpCinwR1WnGQSNnOPHeCZ9NKjzZglXZTizHkxTBlN l1ZI2T2zLtuAf1HsCtOpniwjXWokPiCA86/iwYzDZMdtfIjSN/vop62d5JQJCQjcvDnW Ro4Ba67Ni3yKQBdlXVVATcQ8JIMrOgtpdzkk8ectekMATkEksr/kZEPOHD+DrZOw8Jjp c0O04AuezoEuTBIfDJLqzIxTtsKbioLzNL4bJicoRpjiXeYEBXM8TtInZ7kRVb9Y6ahy twlQ== X-Gm-Message-State: ALoCoQn/KK4Lx1mGACatswXajvRygX/1P4n5ucqo8ZoZHzy7PwuGql0hkNrYHDFkXgvCO+Mr84Cc X-Received: by 10.70.54.7 with SMTP id f7mr66733571pdp.75.1437449009908; Mon, 20 Jul 2015 20:23:29 -0700 (PDT) Received: from icarus.ozlabs.ibm.com (220-244-113-206.static.tpgi.com.au. [220.244.113.206]) by smtp.gmail.com with ESMTPSA id tm3sm24480316pac.44.2015.07.20.20.23.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jul 2015 20:23:28 -0700 (PDT) From: Joel Stanley To: skiboot@lists.ozlabs.org Date: Tue, 21 Jul 2015 12:53:10 +0930 Message-Id: <1437448995-7936-2-git-send-email-joel@jms.id.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437448995-7936-1-git-send-email-joel@jms.id.au> References: <1437448995-7936-1-git-send-email-joel@jms.id.au> Subject: [Skiboot] [PATCH 1/6] libflash: Put variable sized type at end of struct X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This is a fixes the following error when building with clang: libflash/libffs.c:37:18: error: field 'hdr' with variable sized type 'struct ffs_hdr' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct ffs_hdr hdr; /* Converted header */ ^ Signed-off-by: Joel Stanley --- libflash/libffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libflash/libffs.c b/libflash/libffs.c index 0164071..a193357 100644 --- a/libflash/libffs.c +++ b/libflash/libffs.c @@ -34,7 +34,6 @@ enum ffs_type { }; struct ffs_handle { - struct ffs_hdr hdr; /* Converted header */ enum ffs_type type; struct flash_chip *chip; uint32_t toc_offset; @@ -42,6 +41,7 @@ struct ffs_handle { void *cache; uint32_t cached_size; struct blocklevel_device *bl; + struct ffs_hdr hdr; /* Converted header */ }; static uint32_t ffs_checksum(void* data, size_t size)