Repository navigation
Commit a84ef75
committed
fix: guard activation_finish_absent_publish behind its call-site conditions
Building on FreeBSD after syncing with upstream failed with
-Werror,-Wunused-function on activation_finish_absent_publish in
src/cli/activation_transaction.c.
The function is only invoked from three platform-specific branches:
Windows (_WIN32, MoveFileExW), macOS (__APPLE__, renameatx_np), and
modern Linux (__linux__ with SYS_renameat2, via syscall). On every other
POSIX target — including FreeBSD and other BSDs — control falls through
to the portable linkat(2) fallback, so the helper was defined but never
called, tripping -Wunused-function under -Werror.
Rather than excluding FreeBSD by name (which would still break on
OpenBSD, NetBSD, DragonFly, Solaris, or any Linux without
SYS_renameat2), wrap the function definition in the same #if condition
as its call sites. This keeps the guard mechanically tied to actual
usage instead of enumerating platforms, so it stays correct as new
targets are added.
Signed-off-by: Pedro Ramos <131530838+pr9000@users.noreply.github.com>1 parent d6be58e commit a84ef75
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| 1698 | + | |
1698 | 1699 | | |
1699 | 1700 | | |
1700 | 1701 | | |
| |||
1705 | 1706 | | |
1706 | 1707 | | |
1707 | 1708 | | |
| 1709 | + | |
1708 | 1710 | | |
1709 | 1711 | | |
1710 | 1712 | | |
| |||
0 commit comments