grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GRUB PARTUUID PATCH V3 1/5] Fix flex-2.6.3 incompatbility issue


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [GRUB PARTUUID PATCH V3 1/5] Fix flex-2.6.3 incompatbility issue
Date: Mon, 27 Feb 2017 00:28:58 +0000

Please explain why this patch is needed. I compile with 2.6.1 just fine

On Sun, Feb 26, 2017, 16:22 Nicholas Vinson <address@hidden> wrote:
---
 grub-core/script/yylex.l | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
index 95b219170..3917904b4 100644
--- a/grub-core/script/yylex.l
+++ b/grub-core/script/yylex.l
@@ -31,10 +31,6 @@
 #pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wsign-compare"

-#define yyalloc(size, scanner)   (grub_malloc((size)))
-#define yyfree(ptr, scanner)   (grub_free((ptr)))
-#define yyrealloc(ptr, size, scanner) (grub_realloc((ptr), (size)))
-
 /*
  * As we don't have access to yyscanner, we cannot do much except to
  * print the fatal error.
@@ -327,6 +323,24 @@ POS_MULTILINE   {WORD}?\\\n
                 }
 %%

+void *
+yyalloc(yy_size_t size, yyscan_t yyscanner)
+{
This is missing __attribute__ ((unused)) for second argument
+  return grub_malloc(size);
+}
+
+void
+yyfree(void *ptr, yyscan_t yyscanner)
+{
Ditto
+  return grub_free(ptr);
+}
+
+void *
+yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner)
+{
Ditto
+  return grub_realloc(ptr, size);
+}
+
 int
 yywrap (yyscan_t yyscanner)
 {
--
2.12.0


_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]