fix unreferenced variable warning, re #10528