Revert "fix unreachable code warning"

This reverts commit 202fe39d34.

If mkostemp is a weak symbol and is null, then the code will
be reachable.
This commit is contained in:
ridiculousfish 2020-07-04 14:49:05 -07:00
parent 79d6710db4
commit e530163078

View file

@ -63,13 +63,12 @@ int fish_mkstemp_cloexec(char *name_template) {
if (&mkostemp != nullptr) { if (&mkostemp != nullptr) {
return mkostemp(name_template, O_CLOEXEC); return mkostemp(name_template, O_CLOEXEC);
} }
#else #endif
int result_fd = mkstemp(name_template); int result_fd = mkstemp(name_template);
if (result_fd != -1) { if (result_fd != -1) {
fcntl(result_fd, F_SETFD, FD_CLOEXEC); fcntl(result_fd, F_SETFD, FD_CLOEXEC);
} }
return result_fd; return result_fd;
#endif
} }
/// Fallback implementations of wcsdup and wcscasecmp. On systems where these are not needed (e.g. /// Fallback implementations of wcsdup and wcscasecmp. On systems where these are not needed (e.g.