aboutsummaryrefslogtreecommitdiff
path: root/src/lzmainfo
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-09-11 19:03:35 +0300
committerLasse Collin <lasse.collin@tukaani.org>2023-09-22 20:06:27 +0300
commit217958d88713b5dc73d366d24dd64b2b311b86fe (patch)
tree47db7ba64a4b2c72ac32623dd296cb3757038fdb /src/lzmainfo
parentRemove incorrect uses of __attribute__((__malloc__)). (diff)
downloadxz-217958d88713b5dc73d366d24dd64b2b311b86fe.tar.xz
xz, xzdec, lzmainfo: Use tuklib_attr_noreturn.
For compatibility with C23's [[noreturn]], tuklib_attr_noreturn must be at the beginning of declaration (before "extern" or "static", and even before any GNU C's __attribute__). This commit also moves all other function attributes to the beginning of function declarations. "extern" is kept at the beginning of a line so the attributes are listed on separate lines before "extern" or "static".
Diffstat (limited to '')
-rw-r--r--src/lzmainfo/lzmainfo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lzmainfo/lzmainfo.c b/src/lzmainfo/lzmainfo.c
index b0ccdfb4..71e62958 100644
--- a/src/lzmainfo/lzmainfo.c
+++ b/src/lzmainfo/lzmainfo.c
@@ -26,7 +26,8 @@
#endif
-static void lzma_attribute((__noreturn__))
+tuklib_attr_noreturn
+static void
help(void)
{
printf(
@@ -45,7 +46,8 @@ _("Usage: %s [--help] [--version] [FILE]...\n"
}
-static void lzma_attribute((__noreturn__))
+tuklib_attr_noreturn
+static void
version(void)
{
puts("lzmainfo (" PACKAGE_NAME ") " LZMA_VERSION_STRING);