philsquared / hash_trie

A persistent hash array-mapped trie for C++
BSD 2-Clause "Simplified" License
90 stars 9 forks source link

compiler warnings #4

Open xaxxon opened 6 years ago

xaxxon commented 6 years ago

in clang, I get warnings on two lines:

union { ;
    T m_values[1];
};

For unnecessary ; and

    return sizeof(leaf_node) + sizeof(T*[size-1]);

for using VLAs, which aren't a part of C++

Simply removing the ; in the union and changing the sizeof line to:

    return sizeof(leaf_node) + sizeof(T*) * (size-1);

seems to make the compiler happy.