/* sort it back by block number */
qsort (ebbs, saveCount, sizeof (eBBlock *), bbNumCompare);
+ if (!options.lessPedantic) {
+ // this is a good place to check missing return values
+ if (currFunc) {
+ if (!IS_VOID(currFunc->etype)) {
+ eBBlock *bp;
+ // make sure all predecessors of the last block end in a return
+ for (bp=setFirstItem(ebbs[saveCount-1]->predList);
+ bp;
+ bp=setNextItem(ebbs[saveCount-1]->predList)) {
+ if (bp->ech->op != RETURN) {
+ werror (W_VOID_FUNC, currFunc->name);
+ }
+ }
+ }
+ }
+ }
+
/* if cyclomatic info requested then print it */
if (options.cyclomatic)
printCyclomatic (ebbs, saveCount);
/* throw away blocks */
setToNull ((void **) &graphEdges);
ebbs = NULL;
+
+ currFunc=NULL;
return NULL;
}