]> wimlib.net Git - wimlib/commitdiff
compiler.h: remove _unused_attribute
authorEric Biggers <ebiggers3@gmail.com>
Thu, 30 Mar 2023 07:00:56 +0000 (00:00 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 30 Mar 2023 07:16:51 +0000 (00:16 -0700)
This abstraction layer serves no purpose.  Just use
__attribute__((unused)) directly.

include/wimlib/compiler.h
include/wimlib/reparse.h
include/wimlib/wof.h
src/lzms_compress.c
src/timestamp.c

index 58f0692a58229536ac2a34d40598b6ee53085ae4..40f9276254c4e663cdb5aef7887aa4df5fc0bc63 100644 (file)
                        __attribute__((format(type, format_str, format_start)))
 #endif
 
-/* Hint that the annotated function is intentionally not used.  This might be
- * the case if the function contains only static assertions.  */
-#define _unused_attribute      __attribute__((unused))
-
 /* Endianness definitions.  Either CPU_IS_BIG_ENDIAN() or CPU_IS_LITTLE_ENDIAN()
  * evaluates to 1.  The other evaluates to 0.  Note that newer gcc supports
  * __BYTE_ORDER__ for easily determining the endianness; older gcc doesn't.  In
index 99d466c50f8017c41172c99e6c05930819ac4b6a..972780dfc23fed60607c1b04e85159a50a4b1c78 100644 (file)
@@ -49,7 +49,7 @@ struct reparse_buffer_disk {
 
 #define REPARSE_DATA_MAX_SIZE (REPARSE_POINT_MAX_SIZE - REPARSE_DATA_OFFSET)
 
-static _unused_attribute void
+static void __attribute__((unused))
 check_reparse_buffer_disk(void)
 {
        STATIC_ASSERT(offsetof(struct reparse_buffer_disk, rpdata) == 8);
index b19319dda2cffeb930087d143f5b7adb1b8210ab..6f5017be45c1db4a2e8eb4d21ec8ba836c887695 100644 (file)
@@ -417,7 +417,7 @@ struct WimOverlay_dat_entry_2 {
        } __attribute__((packed));
 } __attribute__((packed));
 
-static _unused_attribute void
+static void __attribute__((unused))
 wof_check_structs(void)
 {
        STATIC_ASSERT(sizeof(struct WimOverlay_dat_header) == 24);
index 5056cb3006a9eeefbda061994456db830f0d6243..428c289ead4aff1e9ab1ba0908f3c38a665bc08f 100644 (file)
@@ -169,7 +169,7 @@ struct lzms_item {
 #define DELTA_SOURCE_POWER_SHIFT       28
 #define DELTA_SOURCE_RAW_OFFSET_MASK   (((u32)1 << DELTA_SOURCE_POWER_SHIFT) - 1)
 
-static _unused_attribute void
+static void __attribute__((unused))
 check_that_powers_fit_in_bitfield(void)
 {
        STATIC_ASSERT(LZMS_NUM_DELTA_POWER_SYMS <= (1 << (31 - DELTA_SOURCE_POWER_SHIFT)));
@@ -975,7 +975,7 @@ static const u32 lzms_bit_costs[LZMS_PROBABILITY_DENOMINATOR + 1] = {
        1
 };
 
-static _unused_attribute void
+static void __attribute__((unused))
 check_cost_shift(void)
 {
        /* lzms_bit_costs is hard-coded to the current COST_SHIFT.  */
index 1e0eef3e113651d22fc30f62730ccf8fd737deee..2d00cc6a4e33440ea24196d675845d6e04ff3673 100644 (file)
@@ -71,7 +71,7 @@ wim_timestamp_to_wimlib_timespec(u64 timestamp, struct wimlib_timespec *wts,
 }
 
 #ifdef _WIN32
-static _unused_attribute void
+static void __attribute__((unused))
 check_sizeof_time_t(void)
 {
        /* Windows builds should always be using 64-bit time_t now. */