Skip to content

Commit ceec133

Browse files
committed
process: fix POSIX platform warnings
1 parent 428caf4 commit ceec133

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/platform/PosixProcess.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ namespace vix::process::platform
139139
return true;
140140
}
141141

142-
void child_fail_and_exit(int error_fd, int err) noexcept
142+
[[noreturn]] void child_fail_and_exit(int error_fd, int err) noexcept
143143
{
144144
(void)write_full(error_fd, &err, sizeof(err));
145145
_exit(127);
146146
}
147-
147+
#if !defined(__linux__)
148148
std::optional<std::string> get_env_value(
149149
const std::vector<std::string> &env_storage,
150150
std::string_view key)
@@ -208,12 +208,16 @@ namespace vix::process::platform
208208
out.append(file);
209209
return out;
210210
}
211-
211+
#endif
212212
[[noreturn]] void exec_with_path_search_or_exit(
213213
const Command &command,
214214
std::vector<char *> &argv,
215215
std::vector<char *> &envp,
216+
#if defined(__linux__)
217+
[[maybe_unused]] const std::vector<std::string> &env_storage,
218+
#else
216219
const std::vector<std::string> &env_storage,
220+
#endif
217221
int error_fd)
218222
{
219223
#if defined(__linux__)

0 commit comments

Comments
 (0)