Fix Linux build and warning unused variable