core: fix warning about discarding volatile
Merge pull request #1027 from mehlis/core-tcb-warning

core: fix warning about discarding volatile