Fix compilation after changes in rust master
Fix a couple of dead code warnings