Clear warning
Add regression test case
Merge pull request #2742 from ke-yu/fix_warning_issue

Fix issue that runtime warnign not cleared