Some small fixes for errors caught in static analysis.
Added platform-independent linebreak for constraint logging test.