build warnings

remove some warnings: deprecated api, uninitialized variables
Merge branch 'warnings'