Fix trivial warnings

Fix some trivial warnings that can be seen on both visual studio and gcc.