build as C++
remove unused local variable