Skip to content

Commit

Permalink
MDEV-15778: Remove packed attr from omt_ and subtree_ classes
Browse files Browse the repository at this point in the history
This is happening because they are declared as packed
and clang has -Waddress-of-packed-member when passing the
address of a packed member, a legit concern on different
architectures. The easiest way to get rid of the errors is to
remove the packed attribute from said structs.
  • Loading branch information
shinnok authored and cvicentiu committed Jun 10, 2018
1 parent b8e267c commit 1735fa3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions storage/tokudb/ft-index/util/omt.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class subtree_templated {
paranoid_invariant(index != NODE_NULL);
m_index = index;
}
} __attribute__((__packed__,aligned(4)));
} ;

template<>
class subtree_templated<true> {
Expand Down Expand Up @@ -238,7 +238,7 @@ class subtree_templated<true> {
inline void disable_bit(void) {
m_bitfield &= MASK_INDEX;
}
} __attribute__((__packed__)) ;
} ;

template<typename omtdata_t, bool subtree_supports_marks>
class omt_node_templated {
Expand All @@ -251,7 +251,7 @@ class omt_node_templated {
// this needs to be in both implementations because we don't have
// a "static if" the caller can use
inline void clear_stolen_bits(void) {}
} __attribute__((__packed__,aligned(4)));
} ;

template<typename omtdata_t>
class omt_node_templated<omtdata_t, true> {
Expand Down Expand Up @@ -288,7 +288,7 @@ class omt_node_templated<omtdata_t, true> {
this->unset_marked_bit();
this->unset_marks_below_bit();
}
} __attribute__((__packed__,aligned(4)));
} ;

}

Expand Down

0 comments on commit 1735fa3

Please sign in to comment.