diff options
-rw-r--r-- | src/liblzma/common/alone_decoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/common/alone_encoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/common/block_encoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/common/common.c | 2 | ||||
-rw-r--r-- | src/liblzma/common/common.h | 2 | ||||
-rw-r--r-- | src/liblzma/common/index_decoder.c | 9 | ||||
-rw-r--r-- | src/liblzma/common/index_encoder.c | 11 | ||||
-rw-r--r-- | src/liblzma/delta/delta_encoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/lz/lz_decoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/lz/lz_encoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/simple/arm.c | 2 | ||||
-rw-r--r-- | src/liblzma/simple/armthumb.c | 2 | ||||
-rw-r--r-- | src/liblzma/simple/ia64.c | 2 | ||||
-rw-r--r-- | src/liblzma/simple/powerpc.c | 2 | ||||
-rw-r--r-- | src/liblzma/simple/simple_coder.c | 2 | ||||
-rw-r--r-- | src/liblzma/simple/sparc.c | 2 | ||||
-rw-r--r-- | src/lzmainfo/lzmainfo.c | 4 | ||||
-rw-r--r-- | src/xz/coder.c | 2 | ||||
-rw-r--r-- | src/xz/hardware.h | 2 | ||||
-rw-r--r-- | src/xz/message.c | 2 | ||||
-rw-r--r-- | src/xz/message.h | 18 | ||||
-rw-r--r-- | src/xz/options.c | 6 | ||||
-rw-r--r-- | src/xz/signals.c | 2 | ||||
-rw-r--r-- | src/xz/util.h | 6 | ||||
-rw-r--r-- | src/xzdec/xzdec.c | 6 |
25 files changed, 49 insertions, 47 deletions
diff --git a/src/liblzma/common/alone_decoder.c b/src/liblzma/common/alone_decoder.c index 039b4285..678c79e6 100644 --- a/src/liblzma/common/alone_decoder.c +++ b/src/liblzma/common/alone_decoder.c @@ -46,7 +46,7 @@ struct lzma_coder_s { static lzma_ret alone_decode(lzma_coder *coder, - lzma_allocator *allocator lzma_attribute((unused)), + lzma_allocator *allocator lzma_attribute((__unused__)), const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, diff --git a/src/liblzma/common/alone_encoder.c b/src/liblzma/common/alone_encoder.c index 7f616557..eb1697e9 100644 --- a/src/liblzma/common/alone_encoder.c +++ b/src/liblzma/common/alone_encoder.c @@ -32,7 +32,7 @@ struct lzma_coder_s { static lzma_ret alone_encode(lzma_coder *coder, - lzma_allocator *allocator lzma_attribute((unused)), + lzma_allocator *allocator lzma_attribute((__unused__)), const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, diff --git a/src/liblzma/common/block_encoder.c b/src/liblzma/common/block_encoder.c index b34c5013..1eeb502b 100644 --- a/src/liblzma/common/block_encoder.c +++ b/src/liblzma/common/block_encoder.c @@ -144,7 +144,7 @@ block_encoder_end(lzma_coder *coder, lzma_allocator *allocator) static lzma_ret block_encoder_update(lzma_coder *coder, lzma_allocator *allocator, - const lzma_filter *filters lzma_attribute((unused)), + const lzma_filter *filters lzma_attribute((__unused__)), const lzma_filter *reversed_filters) { if (coder->sequence != SEQ_CODE) diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c index 0408e153..b9e38602 100644 --- a/src/liblzma/common/common.c +++ b/src/liblzma/common/common.c @@ -35,7 +35,7 @@ lzma_version_string(void) // Memory allocation // /////////////////////// -extern void * lzma_attribute((malloc)) +extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1) lzma_alloc(size_t size, lzma_allocator *allocator) { // Some malloc() variants return NULL if called with size == 0. diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index b8194323..45aba4f0 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -205,7 +205,7 @@ struct lzma_internal_s { /// Allocates memory extern void *lzma_alloc(size_t size, lzma_allocator *allocator) - lzma_attribute((malloc)) lzma_attr_alloc_size(1); + lzma_attribute((__malloc__)) lzma_attr_alloc_size(1); /// Frees memory extern void lzma_free(void *ptr, lzma_allocator *allocator); diff --git a/src/liblzma/common/index_decoder.c b/src/liblzma/common/index_decoder.c index a6bc650e..83c8a3af 100644 --- a/src/liblzma/common/index_decoder.c +++ b/src/liblzma/common/index_decoder.c @@ -56,10 +56,11 @@ struct lzma_coder_s { static lzma_ret index_decode(lzma_coder *coder, lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, - size_t in_size, uint8_t *restrict out lzma_attribute((unused)), - size_t *restrict out_pos lzma_attribute((unused)), - size_t out_size lzma_attribute((unused)), - lzma_action action lzma_attribute((unused))) + size_t in_size, + uint8_t *restrict out lzma_attribute((__unused__)), + size_t *restrict out_pos lzma_attribute((__unused__)), + size_t out_size lzma_attribute((__unused__)), + lzma_action action lzma_attribute((__unused__))) { // Similar optimization as in index_encoder.c const size_t in_start = *in_pos; diff --git a/src/liblzma/common/index_encoder.c b/src/liblzma/common/index_encoder.c index c10d7afa..45919f09 100644 --- a/src/liblzma/common/index_encoder.c +++ b/src/liblzma/common/index_encoder.c @@ -42,12 +42,13 @@ struct lzma_coder_s { static lzma_ret index_encode(lzma_coder *coder, - lzma_allocator *allocator lzma_attribute((unused)), - const uint8_t *restrict in lzma_attribute((unused)), - size_t *restrict in_pos lzma_attribute((unused)), - size_t in_size lzma_attribute((unused)), + lzma_allocator *allocator lzma_attribute((__unused__)), + const uint8_t *restrict in lzma_attribute((__unused__)), + size_t *restrict in_pos lzma_attribute((__unused__)), + size_t in_size lzma_attribute((__unused__)), uint8_t *restrict out, size_t *restrict out_pos, - size_t out_size, lzma_action action lzma_attribute((unused))) + size_t out_size, + lzma_action action lzma_attribute((__unused__))) { // Position where to start calculating CRC32. The idea is that we // need to call lzma_crc32() only once per call to index_encode(). diff --git a/src/liblzma/delta/delta_encoder.c b/src/liblzma/delta/delta_encoder.c index ea1cc2cb..15c7951e 100644 --- a/src/liblzma/delta/delta_encoder.c +++ b/src/liblzma/delta/delta_encoder.c @@ -85,7 +85,7 @@ delta_encode(lzma_coder *coder, lzma_allocator *allocator, static lzma_ret delta_encoder_update(lzma_coder *coder, lzma_allocator *allocator, - const lzma_filter *filters_null lzma_attribute((unused)), + const lzma_filter *filters_null lzma_attribute((__unused__)), const lzma_filter *reversed_filters) { // Delta doesn't and will never support changing the options in diff --git a/src/liblzma/lz/lz_decoder.c b/src/liblzma/lz/lz_decoder.c index 2c573551..d74085cf 100644 --- a/src/liblzma/lz/lz_decoder.c +++ b/src/liblzma/lz/lz_decoder.c @@ -126,7 +126,7 @@ decode_buffer(lzma_coder *coder, static lzma_ret lz_decode(lzma_coder *coder, - lzma_allocator *allocator lzma_attribute((unused)), + lzma_allocator *allocator lzma_attribute((__unused__)), const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, diff --git a/src/liblzma/lz/lz_encoder.c b/src/liblzma/lz/lz_encoder.c index 273f577b..e2406965 100644 --- a/src/liblzma/lz/lz_encoder.c +++ b/src/liblzma/lz/lz_encoder.c @@ -480,7 +480,7 @@ lz_encoder_end(lzma_coder *coder, lzma_allocator *allocator) static lzma_ret lz_encoder_update(lzma_coder *coder, lzma_allocator *allocator, - const lzma_filter *filters_null lzma_attribute((unused)), + const lzma_filter *filters_null lzma_attribute((__unused__)), const lzma_filter *reversed_filters) { if (coder->lz.options_update == NULL) diff --git a/src/liblzma/simple/arm.c b/src/liblzma/simple/arm.c index 8fcf6437..a84702ac 100644 --- a/src/liblzma/simple/arm.c +++ b/src/liblzma/simple/arm.c @@ -15,7 +15,7 @@ static size_t -arm_code(lzma_simple *simple lzma_attribute((unused)), +arm_code(lzma_simple *simple lzma_attribute((__unused__)), uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size) { diff --git a/src/liblzma/simple/armthumb.c b/src/liblzma/simple/armthumb.c index eb6a69d1..4b49175f 100644 --- a/src/liblzma/simple/armthumb.c +++ b/src/liblzma/simple/armthumb.c @@ -15,7 +15,7 @@ static size_t -armthumb_code(lzma_simple *simple lzma_attribute((unused)), +armthumb_code(lzma_simple *simple lzma_attribute((__unused__)), uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size) { diff --git a/src/liblzma/simple/ia64.c b/src/liblzma/simple/ia64.c index fd263d4a..ce3692b9 100644 --- a/src/liblzma/simple/ia64.c +++ b/src/liblzma/simple/ia64.c @@ -15,7 +15,7 @@ static size_t -ia64_code(lzma_simple *simple lzma_attribute((unused)), +ia64_code(lzma_simple *simple lzma_attribute((__unused__)), uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size) { diff --git a/src/liblzma/simple/powerpc.c b/src/liblzma/simple/powerpc.c index aaa14f22..6f835117 100644 --- a/src/liblzma/simple/powerpc.c +++ b/src/liblzma/simple/powerpc.c @@ -15,7 +15,7 @@ static size_t -powerpc_code(lzma_simple *simple lzma_attribute((unused)), +powerpc_code(lzma_simple *simple lzma_attribute((__unused__)), uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size) { diff --git a/src/liblzma/simple/simple_coder.c b/src/liblzma/simple/simple_coder.c index 06db86ec..37de7fa1 100644 --- a/src/liblzma/simple/simple_coder.c +++ b/src/liblzma/simple/simple_coder.c @@ -212,7 +212,7 @@ simple_coder_end(lzma_coder *coder, lzma_allocator *allocator) static lzma_ret simple_coder_update(lzma_coder *coder, lzma_allocator *allocator, - const lzma_filter *filters_null lzma_attribute((unused)), + const lzma_filter *filters_null lzma_attribute((__unused__)), const lzma_filter *reversed_filters) { // No update support, just call the next filter in the chain. diff --git a/src/liblzma/simple/sparc.c b/src/liblzma/simple/sparc.c index 808a59aa..8270d6ab 100644 --- a/src/liblzma/simple/sparc.c +++ b/src/liblzma/simple/sparc.c @@ -15,7 +15,7 @@ static size_t -sparc_code(lzma_simple *simple lzma_attribute((unused)), +sparc_code(lzma_simple *simple lzma_attribute((__unused__)), uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size) { diff --git a/src/lzmainfo/lzmainfo.c b/src/lzmainfo/lzmainfo.c index 3100dc63..b0ccdfb4 100644 --- a/src/lzmainfo/lzmainfo.c +++ b/src/lzmainfo/lzmainfo.c @@ -26,7 +26,7 @@ #endif -static void lzma_attribute((noreturn)) +static void lzma_attribute((__noreturn__)) help(void) { printf( @@ -45,7 +45,7 @@ _("Usage: %s [--help] [--version] [FILE]...\n" } -static void lzma_attribute((noreturn)) +static void lzma_attribute((__noreturn__)) version(void) { puts("lzmainfo (" PACKAGE_NAME ") " LZMA_VERSION_STRING); diff --git a/src/xz/coder.c b/src/xz/coder.c index 5182dddc..b123ec5b 100644 --- a/src/xz/coder.c +++ b/src/xz/coder.c @@ -102,7 +102,7 @@ coder_add_filter(lzma_vli id, void *options) } -static void lzma_attribute((noreturn)) +static void lzma_attribute((__noreturn__)) memlimit_too_small(uint64_t memory_usage) { message(V_ERROR, _("Memory usage limit is too low for the given " diff --git a/src/xz/hardware.h b/src/xz/hardware.h index bed952b0..ad526f26 100644 --- a/src/xz/hardware.h +++ b/src/xz/hardware.h @@ -35,4 +35,4 @@ extern void hardware_memlimit_set(uint64_t new_memlimit, extern uint64_t hardware_memlimit_get(enum operation_mode mode); /// Display the amount of RAM and memory usage limits and exit. -extern void hardware_memlimit_show(void) lzma_attribute((noreturn)); +extern void hardware_memlimit_show(void) lzma_attribute((__noreturn__)); diff --git a/src/xz/message.c b/src/xz/message.c index 38cce4a1..e128cf57 100644 --- a/src/xz/message.c +++ b/src/xz/message.c @@ -94,7 +94,7 @@ static volatile sig_atomic_t progress_needs_updating = false; /// Signal handler for SIGALRM static void -progress_signal_handler(int sig lzma_attribute((unused))) +progress_signal_handler(int sig lzma_attribute((__unused__))) { progress_needs_updating = true; return; diff --git a/src/xz/message.h b/src/xz/message.h index e3fca3cc..74599bd9 100644 --- a/src/xz/message.h +++ b/src/xz/message.h @@ -45,7 +45,7 @@ extern enum message_verbosity message_verbosity_get(void); /// /// This doesn't touch the exit status. extern void message(enum message_verbosity verbosity, const char *fmt, ...) - lzma_attribute((format(printf, 2, 3))); + lzma_attribute((__format__(__printf__, 2, 3))); /// \brief Prints a warning and possibly sets exit status @@ -53,7 +53,7 @@ extern void message(enum message_verbosity verbosity, const char *fmt, ...) /// The message is printed only if verbosity level is at least V_WARNING. /// The exit status is set to WARNING unless it was already at ERROR. extern void message_warning(const char *fmt, ...) - lzma_attribute((format(printf, 1, 2))); + lzma_attribute((__format__(__printf__, 1, 2))); /// \brief Prints an error message and sets exit status @@ -61,25 +61,25 @@ extern void message_warning(const char *fmt, ...) /// The message is printed only if verbosity level is at least V_ERROR. /// The exit status is set to ERROR. extern void message_error(const char *fmt, ...) - lzma_attribute((format(printf, 1, 2))); + lzma_attribute((__format__(__printf__, 1, 2))); /// \brief Prints an error message and exits with EXIT_ERROR /// /// The message is printed only if verbosity level is at least V_ERROR. extern void message_fatal(const char *fmt, ...) - lzma_attribute((format(printf, 1, 2))) - lzma_attribute((noreturn)); + lzma_attribute((__format__(__printf__, 1, 2))) + lzma_attribute((__noreturn__)); /// Print an error message that an internal error occurred and exit with /// EXIT_ERROR. -extern void message_bug(void) lzma_attribute((noreturn)); +extern void message_bug(void) lzma_attribute((__noreturn__)); /// Print a message that establishing signal handlers failed, and exit with /// exit status ERROR. -extern void message_signal_handler(void) lzma_attribute((noreturn)); +extern void message_signal_handler(void) lzma_attribute((__noreturn__)); /// Convert lzma_ret to a string. @@ -116,11 +116,11 @@ extern void message_try_help(void); /// Prints the version number to stdout and exits with exit status SUCCESS. -extern void message_version(void) lzma_attribute((noreturn)); +extern void message_version(void) lzma_attribute((__noreturn__)); /// Print the help message. -extern void message_help(bool long_help) lzma_attribute((noreturn)); +extern void message_help(bool long_help) lzma_attribute((__noreturn__)); /// \brief Set the total number of files to be processed diff --git a/src/xz/options.c b/src/xz/options.c index 379a2e46..f21a0ba5 100644 --- a/src/xz/options.c +++ b/src/xz/options.c @@ -150,7 +150,7 @@ enum { static void set_delta(void *options, uint32_t key, uint64_t value, - const char *valuestr lzma_attribute((unused))) + const char *valuestr lzma_attribute((__unused__))) { lzma_options_delta *opt = options; switch (key) { @@ -194,7 +194,7 @@ enum { static void set_bcj(void *options, uint32_t key, uint64_t value, - const char *valuestr lzma_attribute((unused))) + const char *valuestr lzma_attribute((__unused__))) { lzma_options_bcj *opt = options; switch (key) { @@ -241,7 +241,7 @@ enum { }; -static void lzma_attribute((noreturn)) +static void lzma_attribute((__noreturn__)) error_lzma_preset(const char *valuestr) { message_fatal(_("Unsupported LZMA1/LZMA2 preset: %s"), valuestr); diff --git a/src/xz/signals.c b/src/xz/signals.c index 4d6a9da3..de213644 100644 --- a/src/xz/signals.c +++ b/src/xz/signals.c @@ -179,7 +179,7 @@ signals_exit(void) // console window. static BOOL WINAPI -signal_handler(DWORD type lzma_attribute((unused))) +signal_handler(DWORD type lzma_attribute((__unused__))) { // Since we don't get a signal number which we could raise() at // signals_exit() like on POSIX, just set the exit status to diff --git a/src/xz/util.h b/src/xz/util.h index 4b2d3e2f..a2516bf9 100644 --- a/src/xz/util.h +++ b/src/xz/util.h @@ -20,11 +20,11 @@ /// \brief Safe realloc() that never returns NULL extern void *xrealloc(void *ptr, size_t size) - lzma_attribute((malloc)) lzma_attr_alloc_size(2); + lzma_attribute((__malloc__)) lzma_attr_alloc_size(2); /// \brief Safe strdup() that never returns NULL -extern char *xstrdup(const char *src) lzma_attribute((malloc)); +extern char *xstrdup(const char *src) lzma_attribute((__malloc__)); /// \brief Fancy version of strtoull() @@ -102,7 +102,7 @@ extern const char *uint64_to_nicestr(uint64_t value, /// A maximum of *left bytes is written starting from *pos. *pos and *left /// are updated accordingly. extern void my_snprintf(char **pos, size_t *left, const char *fmt, ...) - lzma_attribute((format(printf, 3, 4))); + lzma_attribute((__format__(__printf__, 3, 4))); /// \brief Check if filename is empty and print an error message diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c index fd015076..b7830db4 100644 --- a/src/xzdec/xzdec.c +++ b/src/xzdec/xzdec.c @@ -40,7 +40,7 @@ static unsigned int display_errors = 2; -static void lzma_attribute((format(printf, 1, 2))) +static void lzma_attribute((__format__(__printf__, 1, 2))) my_errorf(const char *fmt, ...) { va_list ap; @@ -57,7 +57,7 @@ my_errorf(const char *fmt, ...) } -static void lzma_attribute((noreturn)) +static void lzma_attribute((__noreturn__)) help(void) { printf( @@ -81,7 +81,7 @@ PACKAGE_NAME " home page: <" PACKAGE_URL ">\n", progname); } -static void lzma_attribute((noreturn)) +static void lzma_attribute((__noreturn__)) version(void) { printf(TOOL_FORMAT "dec (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n" |