fix C compiler warnings reported by CRAN
Merge branch '0.7-rc' into 0.7-rc-full-test