dialog: fix warning: unused variable [-Wunused-variable]