diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-10-25 10:48:24 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-10-25 17:30:03 +0200 |
commit | d22c8cae00f7a7517c9b8228efbb543037c23c97 (patch) | |
tree | 9a63868e98cf13979c8255af016dee20de47439c /storage | |
parent | 481aa0af46930f2252cb8160358b5bd0fd4a8be6 (diff) | |
download | mariadb-git-d22c8cae00f7a7517c9b8228efbb543037c23c97.tar.gz |
compilation fixes for sys-devel/gcc-11.2.0:11
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/include/univ.i | 6 | ||||
-rw-r--r-- | storage/innobase/include/ut0byte.ic | 6 | ||||
-rw-r--r-- | storage/innobase/pars/pars0grm.cc | 4 | ||||
-rw-r--r-- | storage/innobase/pars/pars0grm.y | 4 | ||||
-rw-r--r-- | storage/maria/ma_loghandler.c | 5 |
5 files changed, 19 insertions, 6 deletions
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index a97b6758441..d302770b230 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -240,6 +240,12 @@ easy way to get it to work. See http://bugs.mysql.com/bug.php?id=52263. */ # define UNIV_INTERN #endif +#if defined(__GNUC__) && (__GNUC__ >= 11) +# define ATTRIBUTE_ACCESS(X) __attribute__((access X)) +#else +# define ATTRIBUTE_ACCESS(X) +#endif + #ifndef MY_ATTRIBUTE #if defined(__GNUC__) # define MY_ATTRIBUTE(A) __attribute__(A) diff --git a/storage/innobase/include/ut0byte.ic b/storage/innobase/include/ut0byte.ic index b5b3d73fea8..8ca54c06dbc 100644 --- a/storage/innobase/include/ut0byte.ic +++ b/storage/innobase/include/ut0byte.ic @@ -77,7 +77,7 @@ ut_uint64_align_up( /*********************************************************//** The following function rounds up a pointer to the nearest aligned address. @return aligned pointer */ -UNIV_INLINE +UNIV_INLINE ATTRIBUTE_ACCESS((none,1)) void* ut_align( /*=====*/ @@ -97,7 +97,7 @@ ut_align( The following function rounds down a pointer to the nearest aligned address. @return aligned pointer */ -UNIV_INLINE +UNIV_INLINE ATTRIBUTE_ACCESS((none,1)) void* ut_align_down( /*==========*/ @@ -117,7 +117,7 @@ ut_align_down( The following function computes the offset of a pointer from the nearest aligned address. @return distance from aligned pointer */ -UNIV_INLINE +UNIV_INLINE ATTRIBUTE_ACCESS((none,1)) ulint ut_align_offset( /*============*/ diff --git a/storage/innobase/pars/pars0grm.cc b/storage/innobase/pars/pars0grm.cc index 7e10a783310..10d0d0becd7 100644 --- a/storage/innobase/pars/pars0grm.cc +++ b/storage/innobase/pars/pars0grm.cc @@ -79,6 +79,10 @@ que_node_t */ #include "que0que.h" #include "row0sel.h" +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wfree-nonheap-object" +#endif + #define YYSTYPE que_node_t* /* #define __STDC__ */ diff --git a/storage/innobase/pars/pars0grm.y b/storage/innobase/pars/pars0grm.y index 625ed41bbd4..3fb0865f608 100644 --- a/storage/innobase/pars/pars0grm.y +++ b/storage/innobase/pars/pars0grm.y @@ -38,6 +38,10 @@ que_node_t */ #include "que0que.h" #include "row0sel.h" +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wfree-nonheap-object" +#endif + #define YYSTYPE que_node_t* /* #define __STDC__ */ diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index b98fbe29e1f..8773e80942f 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -3395,10 +3395,9 @@ static uint16 translog_get_chunk_header_length(uchar *chunk) DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH = 3")); DBUG_RETURN(3); break; - default: - DBUG_ASSERT(0); - DBUG_RETURN(0); /* Keep compiler happy */ } + DBUG_ASSERT(0); + DBUG_RETURN(0); /* Keep compiler happy */ } |