gcc-4.6 chokes on casting vobjptridx_t to long; later gcc accepts this. Change the format string to short, then switch the conversion to objnum_t, which has an exact match for the converting operator.