summaryrefslogtreecommitdiffstats
path: root/src/xspawn.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-07-28 10:47:59 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-07-28 10:54:34 -0400
commit26f3c379c1603ebdc35d1653b677b9e22685fd81 (patch)
tree7767d85b72bd46fe5bd8de772c453f0654fb780a /src/xspawn.c
parenta12c4dbf12f5dff559abc4464b905842031696da (diff)
downloadbfs-26f3c379c1603ebdc35d1653b677b9e22685fd81.tar.xz
prelude: Simplify attributes
Diffstat (limited to 'src/xspawn.c')
-rw-r--r--src/xspawn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xspawn.c b/src/xspawn.c
index 8e6a727..30c9c40 100644
--- a/src/xspawn.c
+++ b/src/xspawn.c
@@ -103,7 +103,7 @@ int bfs_spawn_destroy(struct bfs_spawn *ctx) {
#if _POSIX_SPAWN > 0
/** Set some posix_spawnattr flags. */
-attr(maybe_unused)
+_maybe_unused
static int bfs_spawn_addflags(struct bfs_spawn *ctx, short flags) {
short prev;
errno = posix_spawnattr_getflags(&ctx->attr, &prev);
@@ -519,7 +519,8 @@ static bool bfs_use_posix_spawn(const struct bfs_resolver *res, const struct bfs
#endif // _POSIX_SPAWN > 0
/** Actually exec() the new process. */
-static noreturn void bfs_spawn_exec(struct bfs_resolver *res, const struct bfs_spawn *ctx, char **argv, char **envp, int pipefd[2]) {
+_noreturn
+static void bfs_spawn_exec(struct bfs_resolver *res, const struct bfs_spawn *ctx, char **argv, char **envp, int pipefd[2]) {
xclose(pipefd[0]);
for_slist (const struct bfs_spawn_action, action, ctx) {