Fix compilation warnings

@chachi Please take a look. 
Here is companion pr at RedwoodInternal https://github.com/Trailmix/RedwoodInternal/pull/1928