Fix possible compiler warning of unused 'fd' variable