/in/foo.cc: In member function 'node* node::rotate()':
/in/foo.cc:37:33: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (fa->son[t] = son[!t]) {
^
/in/foo.cc:41:24: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (fa = fa->fa) {
^
/in/foo.cc: In function 'node* findrank(int)':
/in/foo.cc:60:9: warning: unused variable 'tmp' [-Wunused-variable]
int tmp = kth;
^~~
/in/foo.cc: In function 'node* insert(char, int)':
/in/foo.cc:100:10: warning: operation on 'now' may be undefined [-Wsequence-point]
(now = now->son[t])->val = now->hsum = val;
~~~~~^~~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:128:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < str.size(); ++i) {
~~^~~~~~~~~~~~
/in/foo.cc:148:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
mid = l + r + 1 >> 1;
~~~~~~^~~
/in/foo.cc: In member function 'int node::get()':
/in/foo.cc:23:42: warning: nonnull argument 'this' compared to NULL [-Wnonnull-compare]
inline int get() { return this && fa ? fa->son[1] == this : -1; }
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In member function 'int node::getsize()':
/in/foo.cc:27:40: warning: nonnull argument 'this' compared to NULL [-Wnonnull-compare]
inline int getsize() { return this ? size : 0; }
~~~~~^~~~~~~~~~
/in/foo.cc: In member function 'long long int node::gethsum()':
/in/foo.cc:28:46: warning: nonnull argument 'this' compared to NULL [-Wnonnull-compare]
inline long long gethsum() { return this ? hsum : 0; }
~~~~~^~~~~~~~~~