update-mocks: make mocks compile with -Wunused

Do this by scattering UNNEEDED everywhere, except in the case of (void).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-09-01 11:50:32 +09:30
parent 2a603ea36d
commit 6fe5ecb2ac
2 changed files with 5 additions and 5 deletions

View File

@@ -35,5 +35,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/;\$/$STUB/"
tail -n +$LINE < $FILE | head -n $NUM | sed 's/^extern *//' | sed 's/PRINTF_FMT([^)]*)//' | sed 's/,/ UNNEEDED,/g' | sed 's/\([a-z0-9A-Z*_]* [a-z0-9A-Z*_]*\));/\1 UNNEEDED);/' | sed "s/;\$/$STUB/"
done