aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-04 13:23:30 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-04 13:42:10 +0200
commita6d459c6677324826e4ce858bf0c043b78b90756 (patch)
treef42e0af13d5ef3edd3b5bd42ba848e5757a734d8
parent0f50030dccb29b70f15b5b8ddcd7375aef625c98 (diff)
downloadsparse-a6d459c6677324826e4ce858bf0c043b78b90756.tar.gz
add builtin types for signed char* and short *
This is needed for printf format checking of "%hhn" & "%hn". Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--symbol.c3
-rw-r--r--symbol.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/symbol.c b/symbol.c
index 9065bd52..a29e0b14 100644
--- a/symbol.c
+++ b/symbol.c
@@ -782,6 +782,7 @@ struct symbol bool_ctype, void_ctype, type_ctype,
incomplete_ctype, label_ctype, bad_ctype,
null_ctype;
struct symbol autotype_ctype;
+struct symbol schar_ptr_ctype, short_ptr_ctype;
struct symbol int_ptr_ctype, uint_ptr_ctype;
struct symbol long_ptr_ctype, ulong_ptr_ctype;
struct symbol llong_ptr_ctype, ullong_ptr_ctype;
@@ -877,6 +878,8 @@ static const struct ctype_declare {
{ &null_ctype, T_PTR(&void_ctype) },
{ &label_ctype, T_PTR(&void_ctype) },
{ &lazy_ptr_ctype, T_PTR(&void_ctype) },
+ { &schar_ptr_ctype, T_PTR(&schar_ctype) },
+ { &short_ptr_ctype, T_PTR(&short_ctype) },
{ &int_ptr_ctype, T_PTR(&int_ctype) },
{ &uint_ptr_ctype, T_PTR(&uint_ctype) },
{ &long_ptr_ctype, T_PTR(&long_ctype) },
diff --git a/symbol.h b/symbol.h
index f82484f5..d39048cb 100644
--- a/symbol.h
+++ b/symbol.h
@@ -298,6 +298,7 @@ extern struct symbol bool_ctype, void_ctype, type_ctype,
incomplete_ctype, label_ctype, bad_ctype,
null_ctype;
extern struct symbol autotype_ctype;
+extern struct symbol schar_ptr_ctype, short_ptr_ctype;
extern struct symbol int_ptr_ctype, uint_ptr_ctype;
extern struct symbol long_ptr_ctype, ulong_ptr_ctype;
extern struct symbol llong_ptr_ctype, ullong_ptr_ctype;