#!/bin/sh # # flintDead -- look for dead code. Note that the -w0 +eNNN technique # doesn't work for many of the follwoing errors. # # 528 Symbol 'Symbol' (Location) not referenced -- The named # 529 Symbol 'Symbol' (Location) not subsequently referenced -- # 563 Label 'Symbol' (Location) not referenced -- The Symbol at # 714 Symbol 'Symbol' (Location) not referenced -- The named # 715 Symbol 'Symbol' (Location) not referenced -- The named # 750 local macro 'Symbol' (Location) not referenced -- A # 751 local typedef 'Symbol' (Location) not referenced -- A # 752 local declarator 'Symbol' (Location) not referenced -- A # 754 local structure member 'Symbol' (Location) not referenced # 755 global macro 'Symbol' (Location) not referenced -- A # 756 global typedef 'Symbol' (Location) not referenced -- This # 757 global declarator 'Symbol' (Location) not referenced -- # 768 global struct member 'Symbol' (Location) not referenced # 1046 member 'Symbol', referenced in a static function, requires # 1714 Member function 'Symbol' (Location) not referenced -- A # 1715 static member 'Symbol' (Location) not referenced -- A # 1716 Virtual member function 'Symbol' (Location) not referenced # 1750 local template 'Symbol' (Location) not referenced -- A # 1755 global template 'Symbol' (Location) not referenced -- A # 1914 Default constructor 'Symbol' (Location) not referenced -- # #set -x ProgName=`basename $0` main() { if [ $# -lt 1 ]; then say "$ProgName error: you must supply something to lint" say "Usage: $0 [cc-opts] file" exit 1 fi flint '-strong(AJX)' -w4 '-passes(2)' "$@" 2>&1 |\ egrep ' 528:| 529:| 563:| 714:| 715:| 750:| 751:| 752:| 754:| 755:| 756:| 757:| 768:| 1046:| 1714:| 1715:| 1716:| 1750:| 1755:| 1914:' } say() { echo "$@" 1>&2 } main "$@"