Skip to content

Instantly share code, notes, and snippets.

@patrickmmartin
Created May 25, 2017 13:55
Show Gist options
  • Save patrickmmartin/d9ae82f2fd35566b3495832145334a9d to your computer and use it in GitHub Desktop.
Save patrickmmartin/d9ae82f2fd35566b3495832145334a9d to your computer and use it in GitHub Desktop.
examples of attempting to add static analysis to comdb2
splint -D_LINUX_SOURCE -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp db/*.c


splint +posixlib -D_LINUX_SOURCE -Isqlite/inline -I. -Iberkdb/build -Iberkdb/dbinc -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp/decNumber  -Idfp/dfpal -Idb -I/usr/include/x86_64-linux-gnu db/*.c


ls -1 db/*.c | splint -showscan  +posixlib -D_LINUX_SOURCE -Isqlite/inline -I. -Iberkdb/build -Iberkdb/dbinc -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp/decNumber  -Idfp/dfpal -Idb -I/usr/include/x86_64-linux-gnu 


$ ls -1 db/*.c | xargs -n1 splint  +gnuextensions -nullret -nestcomment +posixlib -D_LINUX_SOURCE -Isqlite/inline -Ibbinc -I. -Iberkdb/build -Iberkdb/dbinc -Ibb -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp/decNumber  -Idfp/dfpal -Idb -I/usr/include/x86_64-linux-gnu  >/dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment