remove dead code from toobj.c
Merge pull request #2732 from WalterBright/rm-dead-code

remove dead code from toobj.c