Merge "Fix a compiler warning with --enable-adapt-scan" into nextgenv2