diff --git a/CMakeLists.txt b/CMakeLists.txt index b70b540..afa94f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.5.1) project(CrossGuid) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") option(XG_TESTS "Build test runner" ON) diff --git a/Guid.cpp b/Guid.cpp index bd8c61c..ca0c6be 100644 --- a/Guid.cpp +++ b/Guid.cpp @@ -184,7 +184,8 @@ unsigned char hexPairToChar(char a, char b) // create a guid from string Guid::Guid(const std::string &fromString) { - char charOne, charTwo; + char charOne = '\0'; + char charTwo = '\0'; bool lookingForFirstChar = true; unsigned nextByte = 0;