[oe-commits] Trevor Woerner : grub_git: fix build warning->error
git at git.openembedded.org
git at git.openembedded.org
Tue Jun 10 16:12:55 UTC 2014
Module: openembedded-core.git
Branch: daisy
Commit: 69f9022126d3cd21001f48ec36730982e53a6a48
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=69f9022126d3cd21001f48ec36730982e53a6a48
Author: Trevor Woerner <trevor.woerner at linaro.org>
Date: Thu May 29 00:05:54 2014 -0400
grub_git: fix build warning->error
This patch fixes a build warning which is promoted to an error via -Werror.
changes from v1:
* put "Upstream-Status" in patch itself, not in OE patch header
* fix commit wording
(From OE-Core rev: 4b41f4199d77144a629897173cff3d1efcfa85f9)
Signed-off-by: Trevor Woerner <trevor.woerner at linaro.org>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
.../grub/grub/asciih-fix-build-warning-error.patch | 34 ++++++++++++++++++++++
meta/recipes-bsp/grub/grub_git.bb | 1 +
2 files changed, 35 insertions(+)
diff --git a/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch b/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch
new file mode 100644
index 0000000..48ace56
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch
@@ -0,0 +1,34 @@
+util/grub-gen-asciih.c: fix build warning->error
+
+A potential problem is flagged by the compiler and generates a warning. This
+warning is promoted to an error via -Werror. This patch fixes the original
+issue, avoids the warning, and therefore avoids the build error.
+
+Upstream-Status: Pending
+
+Index: git/util/grub-gen-asciih.c
+===================================================================
+--- git.orig/util/grub-gen-asciih.c
++++ git/util/grub-gen-asciih.c
+@@ -131,6 +131,8 @@ write_font_ascii_bitmap (FILE *file, FT_
+ 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_
+ 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)
+ {
diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
index 114cf77..667730f 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://asciih-fix-build-warning-error.patch \
"
S = "${WORKDIR}/git"
More information about the Openembedded-commits
mailing list