remove casting to fix build error

Dependents:   RTC_Demo