Commit d22c8cae authored by Sergei Golubchik's avatar Sergei Golubchik

compilation fixes for sys-devel/gcc-11.2.0:11

parent 481aa0af
...@@ -2832,7 +2832,6 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) ...@@ -2832,7 +2832,6 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
DBUG_ASSERT(fixed == 1); DBUG_ASSERT(fixed == 1);
int l_sign= 1; int l_sign= 1;
MYSQL_TIME l_time1,l_time2,l_time3; MYSQL_TIME l_time1,l_time2,l_time3;
ErrConvTime str(&l_time3);
/* the following may be true in, for example, date_add(timediff(...), ... */ /* the following may be true in, for example, date_add(timediff(...), ... */
if (fuzzy_date & TIME_NO_ZERO_IN_DATE) if (fuzzy_date & TIME_NO_ZERO_IN_DATE)
......
...@@ -240,6 +240,12 @@ easy way to get it to work. See http://bugs.mysql.com/bug.php?id=52263. */ ...@@ -240,6 +240,12 @@ easy way to get it to work. See http://bugs.mysql.com/bug.php?id=52263. */
# define UNIV_INTERN # define UNIV_INTERN
#endif #endif
#if defined(__GNUC__) && (__GNUC__ >= 11)
# define ATTRIBUTE_ACCESS(X) __attribute__((access X))
#else
# define ATTRIBUTE_ACCESS(X)
#endif
#ifndef MY_ATTRIBUTE #ifndef MY_ATTRIBUTE
#if defined(__GNUC__) #if defined(__GNUC__)
# define MY_ATTRIBUTE(A) __attribute__(A) # define MY_ATTRIBUTE(A) __attribute__(A)
......
...@@ -77,7 +77,7 @@ ut_uint64_align_up( ...@@ -77,7 +77,7 @@ ut_uint64_align_up(
/*********************************************************//** /*********************************************************//**
The following function rounds up a pointer to the nearest aligned address. The following function rounds up a pointer to the nearest aligned address.
@return aligned pointer */ @return aligned pointer */
UNIV_INLINE UNIV_INLINE ATTRIBUTE_ACCESS((none,1))
void* void*
ut_align( ut_align(
/*=====*/ /*=====*/
...@@ -97,7 +97,7 @@ ut_align( ...@@ -97,7 +97,7 @@ ut_align(
The following function rounds down a pointer to the nearest The following function rounds down a pointer to the nearest
aligned address. aligned address.
@return aligned pointer */ @return aligned pointer */
UNIV_INLINE UNIV_INLINE ATTRIBUTE_ACCESS((none,1))
void* void*
ut_align_down( ut_align_down(
/*==========*/ /*==========*/
...@@ -117,7 +117,7 @@ ut_align_down( ...@@ -117,7 +117,7 @@ ut_align_down(
The following function computes the offset of a pointer from the nearest The following function computes the offset of a pointer from the nearest
aligned address. aligned address.
@return distance from aligned pointer */ @return distance from aligned pointer */
UNIV_INLINE UNIV_INLINE ATTRIBUTE_ACCESS((none,1))
ulint ulint
ut_align_offset( ut_align_offset(
/*============*/ /*============*/
......
...@@ -79,6 +79,10 @@ que_node_t */ ...@@ -79,6 +79,10 @@ que_node_t */
#include "que0que.h" #include "que0que.h"
#include "row0sel.h" #include "row0sel.h"
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
#endif
#define YYSTYPE que_node_t* #define YYSTYPE que_node_t*
/* #define __STDC__ */ /* #define __STDC__ */
......
...@@ -38,6 +38,10 @@ que_node_t */ ...@@ -38,6 +38,10 @@ que_node_t */
#include "que0que.h" #include "que0que.h"
#include "row0sel.h" #include "row0sel.h"
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
#endif
#define YYSTYPE que_node_t* #define YYSTYPE que_node_t*
/* #define __STDC__ */ /* #define __STDC__ */
......
...@@ -3395,10 +3395,9 @@ static uint16 translog_get_chunk_header_length(uchar *chunk) ...@@ -3395,10 +3395,9 @@ static uint16 translog_get_chunk_header_length(uchar *chunk)
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH = 3")); DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH = 3"));
DBUG_RETURN(3); DBUG_RETURN(3);
break; break;
default:
DBUG_ASSERT(0);
DBUG_RETURN(0); /* Keep compiler happy */
} }
DBUG_ASSERT(0);
DBUG_RETURN(0); /* Keep compiler happy */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment