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
3 changed files with 11 additions and 8 deletions
+8 -4
View File
@@ -26,10 +26,14 @@ assert_cc(LO_FLAGS_DIRECT_IO == 16);
assert_cc(LOOP_SET_DIRECT_IO == 0x4C08);
#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
# 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
+2 -2
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)
#define DECLARE_FLEX_ARRAY(type, name) type name[];
#define DECLARE_FLEX_ARRAY(type, name) type name[]
#else
/* Declare a flexible array usable in a union.
* This is essentially a work-around for a pointless constraint in C99
+1 -2
View File
@@ -14,9 +14,8 @@
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(char*, freecon, NULL);
#else
static inline char* freeconp(char **p) {
static inline void freeconp(char **p) {
assert(*p == NULL);
return NULL;
}
#endif