aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sparse.1
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2018-10-30 10:36:26 +0000
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-05 12:56:10 +0200
commitefc02e9ee225d1327be004181da74f59f2aa2c11 (patch)
tree04803b041d535bde1eecd7aab2be20be38290721 /sparse.1
parent375690b61e8ec4735b19bcead756ba526edab57e (diff)
downloadsparse-efc02e9ee225d1327be004181da74f59f2aa2c11.tar.gz
evaluate: check variadic argument types against format stringformat-check
The variadic argument code did not check any of the variadic arguments as it did not previously know the possible type. Now we have the possible formatting information stored in the ctype, we can do some checks on the printf formatting types. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'sparse.1')
-rw-r--r--sparse.19
1 files changed, 9 insertions, 0 deletions
diff --git a/sparse.1 b/sparse.1
index 48dab7a9..03ad2141 100644
--- a/sparse.1
+++ b/sparse.1
@@ -257,6 +257,15 @@ Sparse issues these warnings by default. To turn them off, use
\fB\-Wno\-external\-function\-has\-definition\fR.
.
.TP
+.B \-Wformat
+Warn about parameter mismatch to any variadic function which specifies
+where the format string is specified with the
+.BI __attribute__((format(type, message, va_start)))
+attribute.
+
+Sparse does not issue these warnings by default.
+.
+.TP
.B \-Winit\-cstring
Warn about initialization of a char array with a too long constant C string.