#!/bin/sh

# To add the memory checks back in, remove -nullstate -mustfreeonly -temptrans -nullret -onlytrans -mustfreefresh -globstate -compdef -usedef -compmempass -nullpass -nullderef -unqualifiedtrans -predboolint -formatconst -boolops -usereleased -dependenttrans -boolcompare -kepttrans -immediatetrans -uniondef -mustdefine -statictrans -nullassign -noeffect -evalorder -casebreak -exitarg -mayaliasunique -matchfields -macroredef

# Runs splint on source code
$SPLINTBIN/splint -warnflags -I$IVPREFIX/include -standard -unsignedcompare -nullstate -mustfreeonly -temptrans -nullret -onlytrans -mustfreefresh -globstate -compdef -usedef -compmempass -nullpass -nullderef -unqualifiedtrans -predboolint -formatconst -boolops -usereleased -dependenttrans -boolcompare -kepttrans -immediatetrans -uniondef -mustdefine -statictrans -warnlintcomments -nullassign -noeffect -evalorder -casebreak -exitarg -mayaliasunique -matchfields -macroredef -exportlocal -redef -fullinitblock -unrecog -compdestroy -predboolothers -branchstate -type -varuse -shadow -incondefs +posixlib +charindex +boolint arc.c assertion.c attr.c binding.c cli.c codegen.c comb.c db.c enumerate.c exclude.c expr.c fsm_arg.c fsm.c fsm_var.c func_iter.c func_unit.c gen_item.c genprof.c info.c instance.c keywords_1995.c keywords_2001.c keywords_sv.c lexer.c line.c link.c lxt2_read.c lxt.c main.c memory.c merge.c obfuscate.c ovl.c param.c parse.c parser.c parser_misc.c perf.c pplexer.c profiler.c race.c rank.c reentrant.c report.c scope.c score.c search.c sim.c stat.c statement.c static.c static_lexer.c static_parser.c stmt_blk.c struct_union.c symtable.c tcl_funcs.c toggle.c tree.c util.c vcd.c vector.c vsignal.c | tee osplint
