build warnings

resolve some warnings: deprecated api, uninitialized variables