aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-01-29 03:49:44 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-19 17:20:13 -0300
commitf7da0e74d717bf668740233f72e3f2c1ec882129 (patch)
tree30c9cb8689c3f22224597eaac4017483bc0e1084 /etc
parentbuild(deps): bump github/codeql-action from 3.24.0 to 3.24.3 (diff)
downloadfirejail-f7da0e74d717bf668740233f72e3f2c1ec882129.tar.gz
firejail-f7da0e74d717bf668740233f72e3f2c1ec882129.tar.zst
firejail-f7da0e74d717bf668740233f72e3f2c1ec882129.zip
build: move errExit macro into inline function
Move most of the `errExit` macro into a new `_errExit` inline function and use the former just to forward arguments to the latter. This reduces the noise in the build output when using `-fanalyzer`, as it causes the `errExit` macro to stop being expanded. For example, the complete output of the following warning in src/firejail/dbus.c is reduced from 243 lines to 141 lines (a ~41% reduction): $ pacman -Q gcc gcc 13.2.1-5 $ ./configure --enable-apparmor --enable-analyzer >/dev/null && make clean >/dev/null && make >/dev/null [...] ../../src/firejail/dbus.c: In function ‘dbus_proxy_start’: ../../src/firejail/dbus.c:311:36: warning: leak of file descriptor ‘dup2(output_fd, 1)’ [CWE-775] [-Wanalyzer-fd-leak] 311 | if (dup2(output_fd, STDOUT_FILENO) != STDOUT_FILENO) [...] ‘dbus_create_user_dir’: event 5 | |../../src/firejail/../include/common.h:42:25: | 42 | #define errExit(msg) do { \ | | ^ | | | | | (5) ...to here ../../src/firejail/dbus.c:239:17: note: in expansion of macro ‘errExit’ | 239 | errExit("asprintf"); | | ^~~~~~~ [...] Relates to #6190.
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions