From patchwork Wed May 28 13:26:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 31056 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 47D8E20068 for ; Wed, 28 May 2014 13:28:21 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id lc6sf40509673vcb.11 for ; Wed, 28 May 2014 06:28:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=1ODrgOhB4KGwfjw3UrbTWheLYqro+NSXHv7/5Kf4A+U=; b=cK8VHGCvFYzu1uVzuL0oPJ9F4B/XES/lMvYZk81j8eMTNX+EmHWlFjl12LcJ3z/3kP mrAhkDajuXI0tpLEMVl6M6NBrW/sxRhHKXX2zfapj353+DYlzCwCMkQaN6PMAZPhPkq5 cHoNcGgdaploULpinP29+hED8LA1hjHos/YqMReKEYyuq7IJXxCUcs4kmOqDVT8O9XNO lfVW2uwqmFAkJ8t6UjiEn2wEjEHwk0tw7U5hNpHEToS6vIioLKpHKjGSqFDCgllqs3tE jNDOfj2SvNyjejil8aZDDtj0XUaHJlfzdP7yugNzaq1T6kj88BaXIQkSoaPKqXOQ34el 0I/Q== X-Gm-Message-State: ALoCoQk3EEw4H/LScFmGzPMWF2AQOmG9X/7KBwQLMTJ/AAAdGGhFWBi+jsNvRVsIyLDxRqBGx6Qd X-Received: by 10.224.90.2 with SMTP id g2mr16103090qam.1.1401283701058; Wed, 28 May 2014 06:28:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.72 with SMTP id k66ls88790qgd.96.gmail; Wed, 28 May 2014 06:28:20 -0700 (PDT) X-Received: by 10.221.59.194 with SMTP id wp2mr922855vcb.59.1401283700898; Wed, 28 May 2014 06:28:20 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id um1si10537158veb.11.2014.05.28.06.28.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 06:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.178 as permitted sender) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id sa20so12648383veb.9 for ; Wed, 28 May 2014 06:28:20 -0700 (PDT) X-Received: by 10.52.170.237 with SMTP id ap13mr15001391vdc.27.1401283700814; Wed, 28 May 2014 06:28:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp202866vcb; Wed, 28 May 2014 06:28:20 -0700 (PDT) X-Received: by 10.42.101.207 with SMTP id f15mr7449733ico.21.1401283700131; Wed, 28 May 2014 06:28:20 -0700 (PDT) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) by mx.google.com with ESMTPS id f17si12605601igt.12.2014.05.28.06.28.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 06:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of trevor.woerner@linaro.org designates 209.85.223.171 as permitted sender) client-ip=209.85.223.171; Received: by mail-ie0-f171.google.com with SMTP id to1so10248734ieb.2 for ; Wed, 28 May 2014 06:28:19 -0700 (PDT) X-Received: by 10.50.127.146 with SMTP id ng18mr42556031igb.10.1401283699761; Wed, 28 May 2014 06:28:19 -0700 (PDT) Received: from openSUSE-i7.site (69-165-220-158.dsl.teksavvy.com. [69.165.220.158]) by mx.google.com with ESMTPSA id w5sm15833864igk.9.2014.05.28.06.28.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 May 2014 06:28:19 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Cc: patches@linaro.org Subject: [PATCH] grub_git: fix warning->error Date: Wed, 28 May 2014 09:26:38 -0400 Message-Id: <1401283598-9136-1-git-send-email-trevor.woerner@linaro.org> X-Mailer: git-send-email 1.9.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: trevor.woerner@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes a grub build error which is promoted to an error via -Werror. Signed-off-by: Trevor Woerner Upstream-status: submitted --- ...l-grub-gen-asciih-fix-build-warning-error.patch | 44 ++++++++++++++++++++++ meta/recipes-bsp/grub/grub_git.bb | 1 + 2 files changed, 45 insertions(+) create mode 100644 meta/recipes-bsp/grub/grub/0001-util-grub-gen-asciih-fix-build-warning-error.patch diff --git a/meta/recipes-bsp/grub/grub/0001-util-grub-gen-asciih-fix-build-warning-error.patch b/meta/recipes-bsp/grub/grub/0001-util-grub-gen-asciih-fix-build-warning-error.patch new file mode 100644 index 0000000..cb46cad --- /dev/null +++ b/meta/recipes-bsp/grub/grub/0001-util-grub-gen-asciih-fix-build-warning-error.patch @@ -0,0 +1,44 @@ +From 9b8a9aafae67848cadb5961e5edbb34bea8987e1 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Mon, 26 May 2014 12:58:50 -0400 +Subject: [PATCH] util/grub-gen-asciih: fix build warning->error + +Using a GCC 4.8.1 cross-compiler for ARM a "may be used uninitialized in this +function" warning is generated which is converted to an error via -Werror. +This patch eliminates the warning by initializing the structure then checking +it has been filled in correctly after calling add_glyph(). + +Signed-off-by: Trevor Woerner +--- + util/grub-gen-asciih.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/util/grub-gen-asciih.c b/util/grub-gen-asciih.c +index e01447a..c143afd 100644 +--- a/util/grub-gen-asciih.c ++++ b/util/grub-gen-asciih.c +@@ -131,6 +131,8 @@ write_font_ascii_bitmap (FILE *file, FT_Face face) + struct grub_glyph_info glyph; + int char_code; + ++ memset (&glyph, 0, sizeof(glyph)); ++ + fprintf (file, "/* THIS CHUNK OF BYTES IS AUTOMATICALLY GENERATED */\n"); + fprintf (file, "unsigned char ascii_bitmaps[] =\n"); + fprintf (file, "{\n"); +@@ -144,6 +146,12 @@ write_font_ascii_bitmap (FILE *file, FT_Face face) + return; + add_glyph (glyph_idx, face, char_code, &glyph); + ++ if (glyph.bitmap == 0) ++ { ++ fprintf (stderr, "grub-gen-asciih: add_glyph not successful"); ++ exit (1); ++ } ++ + if (glyph.width == 8 && glyph.height == 16 + && glyph.x_ofs == 0 && glyph.y_ofs == 0) + { +-- +1.9.0 + diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb index 1b9497c..e2e0bf0 100644 --- a/meta/recipes-bsp/grub/grub_git.bb +++ b/meta/recipes-bsp/grub/grub_git.bb @@ -22,6 +22,7 @@ SRC_URI = "git://git.savannah.gnu.org/grub.git \ file://40_custom \ file://autogen.sh-exclude-pc.patch \ file://grub-2.00-add-oe-kernel.patch \ + file://0001-util-grub-gen-asciih-fix-build-warning-error.patch \ " S = "${WORKDIR}/git"