aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/common')
-rw-r--r--src/liblzma/common/alone_decoder.c2
-rw-r--r--src/liblzma/common/alone_encoder.c2
-rw-r--r--src/liblzma/common/block_encoder.c2
-rw-r--r--src/liblzma/common/common.c2
-rw-r--r--src/liblzma/common/common.h2
-rw-r--r--src/liblzma/common/index_decoder.c9
-rw-r--r--src/liblzma/common/index_encoder.c11
7 files changed, 16 insertions, 14 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 6afb4fbf..85ae96a9 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 9d776f9a..5c92af27 100644
--- a/src/liblzma/common/common.h
+++ b/src/liblzma/common/common.h
@@ -221,7 +221,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().