* [PATCH] dissect: cleanup report_implicit()
@ 2006-12-14 21:37 Oleg Nesterov
2007-02-23 4:01 ` Josh Triplett
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2006-12-14 21:37 UTC (permalink / raw)
To: Josh Triplett; +Cc: Christopher Li, linux-sparse
It doesn't make sense to do report_implicit() for the anonymous structures,
check "type->ident != NULL".
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- DS/dissect.c~ 2006-04-21 00:04:14.000000000 +0400
+++ DS/dissect.c 2006-04-21 01:04:14.000000000 +0400
@@ -130,12 +130,14 @@ static void report_implicit(usage_t mode
if (type->type != SYM_STRUCT && type->type != SYM_UNION)
return;
- if (reporter->r_member) {
+ if (!reporter->r_member)
+ return;
+
+ if (type->ident != NULL)
reporter->r_member(mode, pos, type, NULL);
- DO_LIST(type->symbol_list, mem,
- report_implicit(mode, pos, base_type(mem)));
- }
+ DO_LIST(type->symbol_list, mem,
+ report_implicit(mode, pos, base_type(mem)));
}
static inline struct symbol *expr_symbol(struct expression *expr)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dissect: cleanup report_implicit()
2006-12-14 21:37 [PATCH] dissect: cleanup report_implicit() Oleg Nesterov
@ 2007-02-23 4:01 ` Josh Triplett
0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2007-02-23 4:01 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: Christopher Li, linux-sparse
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
Oleg Nesterov wrote:
> It doesn't make sense to do report_implicit() for the anonymous structures,
> check "type->ident != NULL".
>
> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Applied.
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-23 4:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-14 21:37 [PATCH] dissect: cleanup report_implicit() Oleg Nesterov
2007-02-23 4:01 ` Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).