fix error: variable 'mem' set but not used [-Werror=unused-but-set-varia...

...ble]