Hurricane Barry weakens