Skip to content

Commit

Permalink
compilation fixes for sys-devel/gcc-11.2.0:11
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Oct 25, 2021
1 parent 481aa0a commit d22c8ca
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
1 change: 0 additions & 1 deletion sql/item_timefunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2832,7 +2832,6 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
DBUG_ASSERT(fixed == 1);
int l_sign= 1;
MYSQL_TIME l_time1,l_time2,l_time3;
ErrConvTime str(&l_time3);

/* the following may be true in, for example, date_add(timediff(...), ... */
if (fuzzy_date & TIME_NO_ZERO_IN_DATE)
Expand Down
6 changes: 6 additions & 0 deletions storage/innobase/include/univ.i
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions storage/innobase/include/ut0byte.ic
Original file line number Diff line number Diff line change
Expand Up @@ -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(
/*=====*/
Expand All @@ -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(
/*==========*/
Expand All @@ -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(
/*============*/
Expand Down
4 changes: 4 additions & 0 deletions storage/innobase/pars/pars0grm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down
4 changes: 4 additions & 0 deletions storage/innobase/pars/pars0grm.y
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down
5 changes: 2 additions & 3 deletions storage/maria/ma_loghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}


Expand Down

0 comments on commit d22c8ca

Please sign in to comment.