Commit c7663904 authored by marko's avatar marko

branches/innodb+: Undo the partial introduction of UNIV_UNUSED, to reduce

differences from branches/zip.  The __attribute__((unused)) should
work on all platforms.  When compiled with something else than GCC,
MySQL supposedly does #define __attribute__(x) /* empty */
so that the attributes will be ignored.
parent 8f3c1d75
......@@ -558,7 +558,7 @@ ibuf_parse_bitmap_init(
/*===================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
byte* end_ptr UNIV_UNUSED, /* in: buffer end */
byte* end_ptr __attribute__((unused)), /* in: buffer end */
buf_block_t* block, /* in: block or NULL */
mtr_t* mtr) /* in: mtr or NULL */
{
......@@ -584,7 +584,7 @@ ibuf_bitmap_page_get_bits(
0 for uncompressed pages */
ulint bit, /* in: IBUF_BITMAP_FREE,
IBUF_BITMAP_BUFFERED, ... */
mtr_t* mtr UNIV_UNUSED)
mtr_t* mtr __attribute__((unused)))
/* in: mtr containing an
x-latch to the bitmap page */
{
......
......@@ -118,7 +118,7 @@ btr_page_get_level(
/*===============*/
/* out: level, leaf level == 0 */
const page_t* page, /* in: index page */
mtr_t* mtr UNIV_UNUSED)
mtr_t* mtr __attribute__((unused)))
/* in: mini-transaction handle */
{
ut_ad(page && mtr);
......@@ -160,7 +160,7 @@ btr_page_get_next(
/*==============*/
/* out: next page number */
const page_t* page, /* in: index page */
mtr_t* mtr UNIV_UNUSED)
mtr_t* mtr __attribute__((unused)))
/* in: mini-transaction handle */
{
ut_ad(page && mtr);
......@@ -200,7 +200,7 @@ btr_page_get_prev(
/*==============*/
/* out: prev page number */
const page_t* page, /* in: index page */
mtr_t* mtr UNIV_UNUSED) /* in: mini-transaction handle */
mtr_t* mtr __attribute__((unused))) /* in: mini-transaction handle */
{
ut_ad(page && mtr);
......
......@@ -340,11 +340,8 @@ it is read. */
/* Minimize cache-miss latency by moving data at addr into a cache before
it is read or written. */
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
/* Tell the compiler that variable/function is unused. */
# define UNIV_UNUSED __attribute__ ((unused))
#else
/* Dummy versions of the macros */
# define UNIV_UNUSED
# define UNIV_EXPECT(expr,value) (expr)
# define UNIV_LIKELY_NULL(expr) (expr)
# define UNIV_PREFETCH_R(addr) ((void) 0)
......
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