fix warnings on enum comparisons
fix size_t format warning
fix fprintf format warning
Merge branch 'warnings' into dev
bump v0.5.2