diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-29 17:39:48 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-29 17:53:21 +0300 |
commit | b2c47400349fcd2a8d5d43bb711f1bfbb48c8485 (patch) | |
tree | d7dbb4c08c05a1e034eb8019545b9d1a7a8e6d7d /sql/sql_bitmap.h | |
parent | baa5a43d8cb2f747eeb70d394a362fb5f3fdd194 (diff) | |
download | mariadb-git-b2c47400349fcd2a8d5d43bb711f1bfbb48c8485.tar.gz |
Fix some -Wsign-conversion
InnoDB was using int64_t instead of ha_rows (unsigned 64-bit).
Diffstat (limited to 'sql/sql_bitmap.h')
-rw-r--r-- | sql/sql_bitmap.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index 5a2caf89fe2..705a8d169e1 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -141,16 +141,16 @@ public: }; }; -/* An iterator to quickly walk over bits in unlonglong bitmap. */ +/* An iterator to quickly walk over bits in ulonglong bitmap. */ class Table_map_iterator { ulonglong bmp; uint no; public: Table_map_iterator(ulonglong t) : bmp(t), no(0) {} - int next_bit() + uint next_bit() { - static const char last_bit[16]= {32, 0, 1, 0, + static const uchar last_bit[16]= {32, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0}; @@ -162,10 +162,10 @@ public: if (!bmp) return BITMAP_END; } - bmp &= ~(1LL << bit); + bmp &= ~(1ULL << bit); return no + bit; } - int operator++(int) { return next_bit(); } + uint operator++(int) { return next_bit(); } enum { BITMAP_END= 64 }; }; @@ -201,7 +201,10 @@ public: bool is_subset(const Bitmap<64>& map2) const { return !(map & ~map2.map); } bool is_overlapping(const Bitmap<64>& map2) const { return (map & map2.map)!= 0; } bool operator==(const Bitmap<64>& map2) const { return map == map2.map; } - char *print(char *buf) const { longlong2str(map,buf,16); return buf; } + char *print(char *buf) const { + longlong2str(longlong(map), buf, 16); + return buf; + } ulonglong to_ulonglong() const { return map; } class Iterator : public Table_map_iterator { |