charview.c: remove dead code, fix more compiler warnings