diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-05-25 15:51:21 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-06-15 10:03:49 +0200 |
| commit | 6081052837c130ef4875a993a8034c9520e4c0ef (patch) | |
| tree | b8b38646b409e6bce0a15c20b6335009e3ef1a87 /sparse.1 | |
| parent | d33fdf2c0ad3a296064b592bbcdc2355c4f41dc0 (diff) | |
| download | sparse-dev-6081052837c130ef4875a993a8034c9520e4c0ef.tar.gz | |
add support for -Wmemcpy-max-count
sparse will warn if memcpy() (or memset(), copy_from_user(),
copy_to_user()) is called with a very large static byte-count.
But this warning is given unconditionaly while there are projects
where this warning may not be not desired.
Change this by making this warning conditional on a new warning
flag: -W[no-]memcpy-max-count
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'sparse.1')
| -rw-r--r-- | sparse.1 | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -210,6 +210,14 @@ trouble. Sparse does not issue these warnings by default. . .TP +.B \-Wmemcpy\-max\-count +Warn about call of \fBmemcpy()\fR, \fBmemset()\fR, \fBcopy_from_user()\fR, or +\fBcopy_to_user()\fR with a large compile-time byte count. + +Sparse issues these warnings by default. To turn them off, use +\fB\-Wno\-memcpy\-max\-count\fR. +. +.TP .B \-Wnon\-pointer\-null Warn about the use of 0 as a NULL pointer. |
