Fix #16805 by formatting warning message