From 80c35dc6904a55b444f6f9a4c2d79bd1529df04e Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 13 Jun 2016 13:47:37 +0300 Subject: [PATCH] db/kernel.return_fixes: add scnprintf() The scnprintf() doesn't return negative numbers. It returns a positive number less than size. (Let's assume the size is not zero to make it easier. If the size is zero we deserve the problems we face). Left to it's own devices Smatch thinks scnprintf() returns a few different possible values so that's why there are three entries for this function. Signed-off-by: Dan Carpenter --- smatch_data/db/kernel.return_fixes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smatch_data/db/kernel.return_fixes b/smatch_data/db/kernel.return_fixes index ccaa111d..6e979526 100644 --- a/smatch_data/db/kernel.return_fixes +++ b/smatch_data/db/kernel.return_fixes @@ -2,3 +2,6 @@ i2c_master_recv s32min-s32max 1-s32max[<=$2] hid_hw_output_report s32min-s32max 1-s32max[<=$2] _regmap_read s32min-(-1),1-s32max (-4095)-(-1) regmap_bulk_read s32min-(-1),1-s32max (-4095)-(-1) +scnprintf s32min-s32max 0-s32max[<$1] +scnprintf s32min-(-2),0-2147483646[<$1] 0-s32max[<$1] +scnprintf s32min-s32max[<=$1] 0-s32max[<$1] -- 2.11.4.GIT