Align cmpsc.c with production (spinhawk) version,
(with some casts to silence some benign warnings).