fix useless use of potentially-uninitialized mode variable in sem_open