Commit 2df4e999 authored by unknown's avatar unknown

pushbuild fixes to please gcc and darwin/ppc64


include/my_atomic.h:
  transparent_union doesn't work in g++, doesn't work on darwin/ppc64
storage/maria/ma_blockrec.c:
  compiler warning
storage/maria/ma_loghandler.c:
  compiler warning
storage/maria/ma_page.c:
  compiler warning
parent 105ce538
...@@ -66,7 +66,16 @@ ...@@ -66,7 +66,16 @@
v=tmp; v=tmp;
#endif #endif
#ifdef __GNUC__ /*
transparent_union doesn't work in g++
Bug ?
Darwin's gcc doesn't want to put pointers in a transparent_union
when built with -arch ppc64. Complains:
warning: 'transparent_union' attribute ignored
*/
#if defined(__GNUC__) && !defined(__cplusplus) && \
! (defined(__APPLE__) && defined(_ARCH_PPC64))
/* /*
we want to be able to use my_atomic_xxx functions with we want to be able to use my_atomic_xxx functions with
both signed and unsigned integers. But gcc will issue a warning both signed and unsigned integers. But gcc will issue a warning
......
...@@ -2033,6 +2033,7 @@ static my_bool write_block_record(MARIA_HA *info, ...@@ -2033,6 +2033,7 @@ static my_bool write_block_record(MARIA_HA *info,
break; break;
default: /* Wrong data */ default: /* Wrong data */
DBUG_ASSERT(0); DBUG_ASSERT(0);
length=0;
break; break;
} }
if (!tmp_data_used && tmp_data + length > end_of_data) if (!tmp_data_used && tmp_data + length > end_of_data)
......
...@@ -676,7 +676,8 @@ const char *maria_data_root; ...@@ -676,7 +676,8 @@ const char *maria_data_root;
cursor cursor which will be checked cursor cursor which will be checked
*/ */
static void translog_check_cursor(struct st_buffer_cursor *cursor) static void translog_check_cursor(struct st_buffer_cursor *cursor
__attribute__((unused)))
{ {
DBUG_ASSERT(cursor->chaser || DBUG_ASSERT(cursor->chaser ||
((ulong) (cursor->ptr - cursor->buffer->buffer) == ((ulong) (cursor->ptr - cursor->buffer->buffer) ==
......
...@@ -29,7 +29,7 @@ uchar *_ma_fetch_keypage(register MARIA_HA *info, ...@@ -29,7 +29,7 @@ uchar *_ma_fetch_keypage(register MARIA_HA *info,
MARIA_PINNED_PAGE **page_link_res) MARIA_PINNED_PAGE **page_link_res)
{ {
uchar *tmp; uchar *tmp;
uint page_size; uint page_size __attribute__((unused));
MARIA_PINNED_PAGE page_link; MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s; MARIA_SHARE *share= info->s;
uint block_size= share->block_size; uint block_size= share->block_size;
...@@ -83,7 +83,8 @@ uchar *_ma_fetch_keypage(register MARIA_HA *info, ...@@ -83,7 +83,8 @@ uchar *_ma_fetch_keypage(register MARIA_HA *info,
/* Write a key-page on disk */ /* Write a key-page on disk */
int _ma_write_keypage(register MARIA_HA *info, register MARIA_KEYDEF *keyinfo, int _ma_write_keypage(register MARIA_HA *info,
register MARIA_KEYDEF *keyinfo __attribute__((unused)),
my_off_t page, enum pagecache_page_lock lock, my_off_t page, enum pagecache_page_lock lock,
int level, uchar *buff) int level, uchar *buff)
{ {
......
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