aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-dissect.c
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-06-19 22:59:28 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-06-21 11:28:40 +0200
commitcd33f157c25d0abbcb68896ae35e23b76d20cbd3 (patch)
treed18f14c74f85aef8dd6dded5771d0b4947c801fa /test-dissect.c
parent9e34da46b99e1e43ed40ec019cce8c06c22eb3fa (diff)
downloadsparse-dev-cd33f157c25d0abbcb68896ae35e23b76d20cbd3.tar.gz
dissect: use built_in_ident() instead of MK_IDENT()
The motivation for this patch was to allow sparse to be compiled with clang which doesn't like static initialization of flexible array members which is used in MK_IDENT(). But also, there is no enough good justifications here for not creating the identifiers the normal way with built_in_ident(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Acked-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'test-dissect.c')
-rw-r--r--test-dissect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test-dissect.c b/test-dissect.c
index a2548b7f..862318f8 100644
--- a/test-dissect.c
+++ b/test-dissect.c
@@ -47,7 +47,7 @@ static void r_symbol(unsigned mode, struct position *pos, struct symbol *sym)
print_usage(pos, sym, mode);
if (!sym->ident)
- sym->ident = MK_IDENT("__asm__");
+ sym->ident = built_in_ident("__asm__");
printf("%-32.*s %s\n",
sym->ident->len, sym->ident->name,
@@ -60,10 +60,10 @@ static void r_member(unsigned mode, struct position *pos, struct symbol *sym, st
print_usage(pos, sym, mode);
- ni = MK_IDENT("?");
+ ni = built_in_ident("?");
si = sym->ident ?: ni;
/* mem == NULL means entire struct accessed */
- mi = mem ? (mem->ident ?: ni) : MK_IDENT("*");
+ mi = mem ? (mem->ident ?: ni) : built_in_ident("*");
printf("%.*s.%-*.*s %s\n",
si->len, si->name,