8 if (!defined($warns)) {
9 print "usage: $0 <warns.txt>\n";
13 my $db = DBI
->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit
=> 0});
14 $db->do("PRAGMA synchronous = OFF");
15 $db->do("PRAGMA cache_size = 800000");
16 $db->do("PRAGMA journal_mode = OFF");
18 $db->do("delete from no_side_effects;");
20 my ($file_and_line, $file, $func, $gs, $static, $dummy);
22 open(WARNS
, "<$warns");
24 # info: no_side_effects
25 if (!($_ =~ /info: no_side_effects /)) {
29 ($file_and_line, $func, $dummy, $dummy, $gs) = split(/ /, $_);
30 ($file, $dummy) = split(/:/, $file_and_line);
34 if ($gs =~ /static/) {
38 $db->do("insert into no_side_effects values ('$file', '$func', $static)");