diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-12-07 15:06:12 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-12-08 13:32:33 -0300 |
commit | b02a7a337c759c130455956d5e9420c5ce3b6108 (patch) | |
tree | 1058b750c18a13c598ea419f6565abc986dfd2aa /src | |
parent | firecfg.config: drop geary (#6116) (diff) | |
download | firejail-b02a7a337c759c130455956d5e9420c5ce3b6108.tar.gz firejail-b02a7a337c759c130455956d5e9420c5ce3b6108.tar.zst firejail-b02a7a337c759c130455956d5e9420c5ce3b6108.zip |
landlock: remove empty functions
Functions with `...` as the first parameter appear to be unsupported in
older versions of gcc, as they fail to compile. Examples:
Error from gcc 9.5.0-1ubuntu1~16.04.sav1 on Ubuntu 16.04:
[...]
In file included from appimage.c:23:
firejail.h:981:27: error: ISO C requires a named argument before ‘...’
981 | static inline int ll_read(...) { return 0; }
| ^~~
Warning from gcc 13.2.1-3 on Artix Linux:
$ ./configure --disable-landlock >/dev/null && make clean >/dev/null &&
make EXTRA_CFLAGS+='-std=c99 -Wpedantic -Wno-error'
[...]
gcc -ggdb -O2 -DVERSION='"0.9.73"' -DMOD_DIR='"src/firejail"' [...]
In file included from appimage.c:23:
firejail.h:982:27: warning: ISO C requires a named argument before ‘...’ before C2X [-Wpedantic]
982 | static inline int ll_read(...) { return 0; }
| ^~~
Fixes #6115.
Relates to #6078.
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/firejail.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h index 0b34c3019..613fafe72 100644 --- a/src/firejail/firejail.h +++ b/src/firejail/firejail.h | |||
@@ -976,16 +976,6 @@ int ll_exec(const char *allowed_path); | |||
976 | int ll_basic_system(void); | 976 | int ll_basic_system(void); |
977 | int ll_restrict(__u32 flags); | 977 | int ll_restrict(__u32 flags); |
978 | void ll_add_profile(int type, const char *data); | 978 | void ll_add_profile(int type, const char *data); |
979 | #else | ||
980 | static inline int ll_get_fd(void) { return -1; } | ||
981 | static inline int ll_is_supported(void) { return 0; } | ||
982 | static inline int ll_read(...) { return 0; } | ||
983 | static inline int ll_write(...) { return 0; } | ||
984 | static inline int ll_special(...) { return 0; } | ||
985 | static inline int ll_exec(...) { return 0; } | ||
986 | static inline int ll_basic_system(void) { return 0; } | ||
987 | static inline int ll_restrict(...) { return 0; } | ||
988 | static inline void ll_add_profile(...) { return; } | ||
989 | #endif /* HAVE_LANDLOCK */ | 979 | #endif /* HAVE_LANDLOCK */ |
990 | 980 | ||
991 | #endif | 981 | #endif |