make warnWeightCnt static std::atomic<bool>