gcc complained about "write" being shadowed even though the "write"