aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/expand
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-16 07:42:28 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-17 23:29:15 +0100
commit0fe7ebb9cdb4b215ffaabac37610f94b1856b6ec (patch)
treed8c55f51db0fd3da739d9b6faf87a3fd91c01a13 /validation/expand
parent87e9f4270a611738322712f572f12a9e395bfc73 (diff)
downloadsparse-dev-0fe7ebb9cdb4b215ffaabac37610f94b1856b6ec.tar.gz
show-parse: do not display base type's redundant specifiers
In do_show_type(), builtin_typename() is used to display builtin (base) types and modifier_string() is used to display modifiers. However, most base types contains some intrinsic modifiers, the type specifiers. So, a type like 'unsigned long' is displayed as 'unsigned long [unsigned] [long]'. Fix this redundancy by not displaying the specifiers when displaying a base_type (or an enum). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/expand')
-rw-r--r--validation/expand/builtin-expect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/validation/expand/builtin-expect.c b/validation/expand/builtin-expect.c
index 1207c132..f4e0664b 100644
--- a/validation/expand/builtin-expect.c
+++ b/validation/expand/builtin-expect.c
@@ -86,10 +86,10 @@ fptr:
*
* check-error-start
expand/builtin-expect.c:33:33: warning: incorrect type in argument 1 (different base types)
-expand/builtin-expect.c:33:33: expected long [signed]
+expand/builtin-expect.c:33:33: expected long
expand/builtin-expect.c:33:33: got void *a
expand/builtin-expect.c:33:36: warning: incorrect type in argument 2 (different base types)
-expand/builtin-expect.c:33:36: expected long [signed]
+expand/builtin-expect.c:33:36: expected long
expand/builtin-expect.c:33:36: got void *a
expand/builtin-expect.c:33:32: warning: incorrect type in return expression (different base types)
expand/builtin-expect.c:33:32: expected void *