Fix some warnings

The 'offset' variable needs to stay because the disabled code below uses it.