Core: Fix warnings about unused variables