Fix compiler warnings.
Merge branch 'master' into v2.1