add support for -fmemcpy-max-count
commitbcfe020ed939fa1e8474efaf31a86d80d0e5c5fe
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Thu, 25 May 2017 13:51:35 +0000 (25 15:51 +0200)
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Thu, 15 Jun 2017 08:03:49 +0000 (15 10:03 +0200)
treebf64a743ac1bc930757ac0198df845f544a13202
parent6081052837c130ef4875a993a8034c9520e4c0ef
add support for -fmemcpy-max-count

By default, sparse will warn if memcpy() (or memset(),
copy_from_user(), copy_to_user()) is called with a very large
static byte-count.

But the limit is currently fixed at 100000, which may be fine
for some uses but not for others. For example, this value is
too low for sparse to be used on the git tree where, for example,
some array used to sort the index is cleared with memset().

Change this by making the limit configurable via a new flag:
-fmemcpy-max-count.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
cgcc
lib.c
lib.h
sparse.1
sparse.c