[core] Fix compiler warnings