Here's one not caught by preFAST (was actually looking for something else)
3ddraw.cpp:
//like g3_draw_poly(), but checks to see if facing. If surface normal is
//NULL, this routine must compute it, which will be slow. It is better to
//pre-compute the normal, and pass it to this function. When the normal
//is passed, this function works like g3_check_normal_facing() plus
//g3_draw_poly().
//returns -1 if not facing, 1 if off screen, 0 if drew
int g3_draw_poly_if_facing(int nv,vertex **pointlist,uint tmap_flags,vec3d *norm,vec3d *pnt)
{
Assert( G3_count == 1 );
if (do_facing_check(norm,pointlist,pnt))
return g3_draw_poly(nv,pointlist,tmap_flags);
else
return 255;
}
255 is not -1. Should be (int)-1;
EDIT: It's never called. Never mind.
EDIT2:
There's another case of this on line 702 of 3ddraw.cpp. I can't find a case of where the return value from g3_draw_poly is checked, but it may be worth correcting this anyway.