fileutil: Squash some unused-variable etc. warnings without CONFIG_XATTR

A bit tricky; we have to move the implementation into an internal
helper.