Re: [PATCH] Handle SForced in storage_modifiers

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

 



On Thu, Nov 17, 2016 at 06:28:15AM +0800, Christopher Li wrote:
> On Tue, Nov 15, 2016 at 10:07 AM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> >
> > That looks fine to me. If you want to merge that one, then:
> >
> > Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
> 
> The patches is applied on "chrisl" repo and pushed out.
> 
> Actually I want to merge the patch having you as the author.
> 
> Chris
> --


I just noticed now, while doing some merging, that what have been commited
on the master tree is not the patch discussed here.
What have been commited is the same change but with 'CMax' (integer class)
while it was supposed to be 'SMax' (for the array of specifier).
The version on sparse-next is correct though.

Here is a patch fixing this:

>From 04ffa624446bda7fbbc2c98fa012cb6e4bac1c53 Mon Sep 17 00:00:00 2001
From: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
Date: Thu, 5 Jan 2017 07:31:46 +0100
Subject: [PATCH] fix mixup in "Handle SForced in storage_modifiers"

The patch used the wrong enum for the maximum size of the array.

Fixes: 1db3b627 ("Handle SForced in storage_modifiers")
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 parse.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/parse.c b/parse.c
index b52c6abe..385e40ce 100644
--- a/parse.c
+++ b/parse.c
@@ -105,11 +105,11 @@ enum {
 };
 
 enum {
-	CInt = 0, CSInt, CUInt, CReal, CChar, CSChar, CUChar, CMax,
+	CInt = 0, CSInt, CUInt, CReal, CChar, CSChar, CUChar,
 };
 
 enum {
-	SNone = 0, STypedef, SAuto, SRegister, SExtern, SStatic, SForced
+	SNone = 0, STypedef, SAuto, SRegister, SExtern, SStatic, SForced, SMax,
 };
 
 static struct symbol_op typedef_op = {
@@ -1281,7 +1281,7 @@ static const char *storage_class[] =
 
 static unsigned long storage_modifiers(struct decl_state *ctx)
 {
-	static unsigned long mod[CMax] =
+	static unsigned long mod[SMax] =
 	{
 		[SAuto] = MOD_AUTO,
 		[SExtern] = MOD_EXTERN,
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux