MSYS build scripts and instructions (#99) and warning fixes

* Preliminary MSYS2 + MinGW build scripts and instructions.

* CMakeLists.txt: MinGW tweaks, enforce C++03, suppress warnings for now.

* Fix some GCC warnings.

* Fix unused parameter warnings coming from Ifc*.h.

* Fix warning regarding unreachable code (++jt) on MSVC.

* Add IfcParse_EXPORT for IfcInvalidTokenException

* Fix potentially uninitialized pointer variables.

* Note about OpenCASCADE cyclic dependencies fix.

* GCC warning fix: don't generate 'current_enum' variable that is only set and not used for anything ever

* Work around -Wmaybe-uninitialized warnings about boost::optional constructs. Also prevent passing of negative values for --bounds.

* Remove unused variable.

* CMakeLists.txt: ENABLE_BUILD_OPTIMIZATIONS for GCC (simply enforce -03)
This commit is contained in:
Ali Kämäräinen
2016-07-15 06:49:32 +03:00
committed by Thomas Krijnen
parent 435eb7ae10
commit 4a85e5e7a5
26 changed files with 1125 additions and 938 deletions
+2 -2
View File
@@ -137,10 +137,10 @@ IfcCharacterDecoder::operator std::string() {
#ifdef HAVE_ICU
if ( previous_codepage != codepage ) {
if ( converter ) ucnv_close(converter);
char encoder[11] = {'i','s','o','-','8','8','5','9','-', (char)codepage + 0x30};
char encoder[11] = {'i','s','o','-','8','8','5','9','-', static_cast<char>(codepage + 0x30) };
converter = ucnv_open(encoder, &status);
}
const char characters[2] = { current_char + 0x80 };
const char characters[2] = { static_cast<char>(current_char + 0x80) };
const char* char_array = &characters[0];
UChar32 ch = ucnv_getNextUChar(converter,&char_array,char_array+1,&status);
addChar(s,ch);