Search code examples
cloggingsplint

How to generate a splint log


I want generate, under Linux, a complete splint report file including also the date and the split tool version. I tried with ">" to redirect the stdio split output to a file but inside the file I found only the split messages To better explain, I run splint on main.c and on stdio the messages are :

**Splint 3.1.2 --- 20 Feb 2018
main.c: (in function main)
main.c:7:8: Variable c declared but not used
A variable is declared but never used. Use /*@unused@*/ in front of
declaration to suppress message. (Use -varuse to inhibit warning)
Finished checking --- 1 code warning**

now I run again the splint tool : splint main.c > report.txt

in the report.txt file I don't found "Splint 3.1.2 --- 20 Feb 2018" and "Finished checking --- 1 code warning" but only the specifi splint messages. How can redirect whole splint output into a file ? Thanks


Solution

  • Since these lines are output via stderr, redirect that into your log file, too.