core: removed some ununsed var warnings.
(cherry picked from commit d21f240134fb3d5648e9a675e7bd00e38a2b0afb)