cpu/cortex-mX_common: make thread_arch cppcheck conform

relates to #1432

the cortex-mX_common seemed to created warnings for cppcheck, this should fix them.