diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-12-14 10:07:44 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-12-14 10:07:44 +0100 |
commit | eb99386180bb187f3ef3a59b222f16c8dfe3b81e (patch) | |
tree | b51fdaa9f629a46f4bf112a7df4dc41b42caa3f3 /gas | |
parent | 8ad93045edcff5128fccc8bff23848f2cfae6453 (diff) | |
download | gdb-eb99386180bb187f3ef3a59b222f16c8dfe3b81e.zip gdb-eb99386180bb187f3ef3a59b222f16c8dfe3b81e.tar.gz gdb-eb99386180bb187f3ef3a59b222f16c8dfe3b81e.tar.bz2 |
x86: adjust type checking constructs
As Alan points out, ASAN takes issue with these constructs, for
current_templates being NULL. Wrap them in sizeof(), so the expressions
aren't actually evaluated.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/tc-i386.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index ffe97d9..990f4b9 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2985,8 +2985,8 @@ md_begin (void) /* Type checks to compensate for the conversion through void * which occurs during hash table insertion / lookup. */ - (void)(sets == ¤t_templates->start); - (void)(end == ¤t_templates->end); + (void) sizeof (sets == ¤t_templates->start); + (void) sizeof (end == ¤t_templates->end); for (; sets < end; ++sets) if (str_hash_insert (op_hash, (*sets)->name, sets, 0)) as_fatal (_("duplicate %s"), (*sets)->name); |