Merge pull request #33352 from YHNdnzj/freeconp-void

Trivial follow-ups for recent PRs
This commit is contained in:
Luca Boccassi 2024-06-15 19:57:13 +01:00 committed by GitHub
commit 2a00e92598
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 8 deletions

View file

@ -26,10 +26,14 @@ assert_cc(LO_FLAGS_DIRECT_IO == 16);
assert_cc(LOOP_SET_DIRECT_IO == 0x4C08); assert_cc(LOOP_SET_DIRECT_IO == 0x4C08);
#endif #endif
#ifndef LOOP_SET_STATUS_SETTABLE_FLAGS
# define LOOP_SET_STATUS_SETTABLE_FLAGS (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN)
#endif
#ifndef LOOP_SET_BLOCK_SIZE #ifndef LOOP_SET_BLOCK_SIZE
# define LOOP_SET_BLOCK_SIZE 0x4C09 # define LOOP_SET_BLOCK_SIZE 0x4C09
#else
assert_cc(LOOP_SET_BLOCK_SIZE == 0x4C09);
#endif
#ifndef LOOP_SET_STATUS_SETTABLE_FLAGS
# define LOOP_SET_STATUS_SETTABLE_FLAGS (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN)
#else
assert_cc(LOOP_SET_STATUS_SETTABLE_FLAGS == (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN));
#endif #endif

View file

@ -517,9 +517,9 @@ static inline uint64_t ALIGN_OFFSET_U64(uint64_t l, uint64_t ali) {
} \ } \
} }
/* Restriction/bug (see above) was fixed in GCC 15 and clang 19.*/ /* Restriction/bug (see below) was fixed in GCC 15 and clang 19. */
#if __GNUC__ >= 15 || (defined(__clang__) && __clang_major__ >= 19) #if __GNUC__ >= 15 || (defined(__clang__) && __clang_major__ >= 19)
#define DECLARE_FLEX_ARRAY(type, name) type name[]; #define DECLARE_FLEX_ARRAY(type, name) type name[]
#else #else
/* Declare a flexible array usable in a union. /* Declare a flexible array usable in a union.
* This is essentially a work-around for a pointless constraint in C99 * This is essentially a work-around for a pointless constraint in C99

View file

@ -14,9 +14,8 @@
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(char*, freecon, NULL); DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(char*, freecon, NULL);
#else #else
static inline char* freeconp(char **p) { static inline void freeconp(char **p) {
assert(*p == NULL); assert(*p == NULL);
return NULL;
} }
#endif #endif