aboutsummaryrefslogtreecommitdiff
path: root/src/xz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2011-05-17 11:54:38 +0300
committerLasse Collin <lasse.collin@tukaani.org>2011-05-17 11:54:38 +0300
commit4c6e146df99696920f12410fb17754412797ef36 (patch)
tree3208666bbb8b3a11c3e0c24e7c3d4d26f05d3144 /src/xz
parentxz: Fix input file position when --single-stream is used. (diff)
downloadxz-4c6e146df99696920f12410fb17754412797ef36.tar.xz
Add underscores to attributes (__attribute((__foo__))).
Diffstat (limited to 'src/xz')
-rw-r--r--src/xz/coder.c2
-rw-r--r--src/xz/hardware.h2
-rw-r--r--src/xz/message.c2
-rw-r--r--src/xz/message.h18
-rw-r--r--src/xz/options.c6
-rw-r--r--src/xz/signals.c2
-rw-r--r--src/xz/util.h6
7 files changed, 19 insertions, 19 deletions
diff --git a/src/xz/coder.c b/src/xz/coder.c
index b470e586..41193a7e 100644
--- a/src/xz/coder.c
+++ b/src/xz/coder.c
@@ -112,7 +112,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 46ebad5b..4fae6181 100644
--- a/src/xz/hardware.h
+++ b/src/xz/hardware.h
@@ -34,4 +34,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 2eecda94..9d9ddae1 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