summaryrefslogtreecommitdiff
path: root/sql/sql_lifo_buffer.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2014-02-19 17:52:47 +0400
committerSergey Petrunya <psergey@askmonty.org>2014-02-19 17:52:47 +0400
commitddc21f7977b47d8779b7f596b82798d222b1e808 (patch)
tree593abf34d1929f254ce5c3ebe10ddb1cddb9404c /sql/sql_lifo_buffer.h
parent260c802e7d66b30e5045bb82243b4d15c704e78c (diff)
downloadmariadb-git-ddc21f7977b47d8779b7f596b82798d222b1e808.tar.gz
Fix compile failure:
In function ‘void* memset(void*, int, size_t)’, inlined from ‘void Lifo_buffer::set_buffer_space(uchar*, uchar*)’ at sql_lifo_buffer.h:70:5, inlined from ‘int DsMrr_impl::dsmrr_init(handler*, RANGE_SEQ_IF*, void*, uint, uint, HANDLER_BUFFER*)’ at multi_range_read.cc:895:62: /usr/include/i386-linux-gnu/bits/string3.h:82:32: error: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters [-Werror] It was intentional that the buffer is set to zero length there.
Diffstat (limited to 'sql/sql_lifo_buffer.h')
-rw-r--r--sql/sql_lifo_buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_lifo_buffer.h b/sql/sql_lifo_buffer.h
index 34f9624436d..95fe02ecda7 100644
--- a/sql/sql_lifo_buffer.h
+++ b/sql/sql_lifo_buffer.h
@@ -67,7 +67,8 @@ public:
{
start= start_arg;
end= end_arg;
- TRASH(start, end - start);
+ if (end != start)
+ TRASH(start, end - start);
reset();
}