Fixed -Werror=unused-but-set-variable in thread_status_impl

Summary:
Fixed -Werror=unused-but-set-variable in thread_status_impl