r2: warning fixes