On Fri, Dec 1, 2023 at 3:51 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > I patched Smatch to just ignore it. I think Luc is on sabatical and > it's not clear if anyone is applying patches now. I think you should also include __seg_fs, this is the x86_32 counterpart to __seg_gs. Uros. > > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > --- > parse.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/parse.c b/parse.c > index 6803976a1337..2ddc29acbd33 100644 > --- a/parse.c > +++ b/parse.c > @@ -74,6 +74,7 @@ static struct token *parse_range_statement(struct token *token, struct statement > static struct token *parse_asm_statement(struct token *token, struct statement *stmt); > static struct token *toplevel_asm_declaration(struct token *token, struct symbol_list **list); > static struct token *parse_static_assert(struct token *token, struct symbol_list **unused); > +static struct token *ignore_seg_gs(struct token *token, struct symbol_list **unused); > > typedef struct token *attr_t(struct token *, struct symbol *, > struct decl_state *); > @@ -354,6 +355,10 @@ static struct symbol_op static_assert_op = { > .toplevel = parse_static_assert, > }; > > +static struct symbol_op seg_gs = { > + .toplevel = ignore_seg_gs, > +}; > + > static struct symbol_op packed_op = { > .attribute = attribute_packed, > }; > @@ -521,6 +526,9 @@ static struct init_keyword { > N("_Float64x", &spec_op, .type = &float64x_ctype), > N("_Float128", &spec_op, .type = &float128_ctype), > N("__float128", &spec_op, .type = &float128_ctype), > + > + N("__seg_gs", &seg_gs), > + > }, keywords[] = { > /* Statements */ > N("if", &if_op), > @@ -2130,6 +2138,11 @@ static struct token *parse_static_assert(struct token *token, struct symbol_list > return token; > } > > +static struct token *ignore_seg_gs(struct token *token, struct symbol_list **unused) > +{ > + return token->next; > +} > + > /* Make a statement out of an expression */ > static struct statement *make_statement(struct expression *expr) > { > -- > 2.42.0 >