From 175c869b6babcf21ca1b8b64ceda92b1a71ee9db Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 20 Feb 2019 22:01:48 +1030 Subject: [PATCH] update-mocks: handle NO_NULL_ARGS and NON_NULL_ARGS functions. Signed-off-by: Rusty Russell --- tools/mockup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mockup.sh b/tools/mockup.sh index 66192a598..878176672 100755 --- a/tools/mockup.sh +++ b/tools/mockup.sh @@ -33,5 +33,5 @@ for SYMBOL; do END=$(tail -n "+${LINE}" < "$FILE" | grep -n ';$'); NUM=${END%%:*} - tail -n "+${LINE}" < "$FILE" | head -n "$NUM" | sed 's/^extern *//' | sed 's/PRINTF_FMT([^)]*)//' | sed 's/NORETURN//g' | sed 's/LAST_ARG_NULL//g' | sed 's/WARN_UNUSED_RESULT//g' | sed 's/,/ UNNEEDED,/g' | sed 's/\([a-z0-9A-Z*_]* [a-z0-9A-Z*_]*\));/\1 UNNEEDED);/' | sed "s/;\$/$STUB/" | sed 's/\s*$//' + tail -n "+${LINE}" < "$FILE" | head -n "$NUM" | sed 's/^extern *//' | sed 's/PRINTF_FMT([^)]*)//' | sed 's/NON_NULL_ARGS([^)]*)//' | sed 's/NO_NULL_ARGS//g' | sed 's/NORETURN//g' | sed 's/LAST_ARG_NULL//g' | sed 's/WARN_UNUSED_RESULT//g' | sed 's/,/ UNNEEDED,/g' | sed 's/\([a-z0-9A-Z*_]* [a-z0-9A-Z*_]*\));/\1 UNNEEDED);/' | sed "s/;\$/$STUB/" | sed 's/\s*$//' done