Fix sparse warnings in c2xml: mark globals static and remove unused globals