aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parse.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-01-05 07:39:48 +0100
committerChristopher Li <sparse@chrisli.org>2017-01-27 08:49:23 -0800
commit9208e04972f2c23bf45448991dd425cb14200d85 (patch)
treeb46f13d3506f0e3500ad7028e4d9edabcccd636f /parse.c
parent1db3b627dfff5a6ab7a7af3259603eb0a10b45aa (diff)
downloadsparse-dev-9208e04972f2c23bf45448991dd425cb14200d85.tar.gz
fix mixup in "Handle SForced in storage_modifiers"
The patch used the wrong enum for the maximum size of the array. 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: Fixes: 1db3b627 ("Handle SForced in storage_modifiers") Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c6
1 files 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,