Skip to content

Commit eac93e3

Browse files
author
Daniel Kroening
authored
Merge pull request #897 from NathanJPhillips/bugfix/warning-in-unicode
Fixed warning in unicode.cpp causing build failure
2 parents 448853c + 10eb073 commit eac93e3

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ build_script:
5454
cp -r deps/minisat2-2.2.1 minisat-2.2.1
5555
patch -d minisat-2.2.1 -p1 < scripts/minisat-2.2.1-patch
5656
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
57-
sed -i "s/BUILD_ENV.*/BUILD_ENV = MSVC/" src/config.inc
57+
sed -i "s/BUILD_ENV[ ]*=.*/BUILD_ENV = MSVC/" src/config.inc
5858
make -C src -j2
5959
6060
test_script:

src/config.inc

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Build platform (use one of AUTO, Unix, OSX_Universal, MSVC, Cygwin, MinGW)
22
BUILD_ENV = AUTO
33

4-
# Enable all warnings
5-
#CXXFLAGS += -Wall -Wno-long-long -Wno-sign-compare -Wno-parentheses -Wno-strict-aliasing -pedantic
6-
7-
# Treat warnings as errors
8-
#CXXFLAGS += -Werror
4+
# Enable all warnings and treat them as errors
5+
ifeq ($(BUILD_ENV),MSVC)
6+
#CXXFLAGS += /Wall /WX
7+
else
8+
CXXFLAGS += -Wall -pedantic -Werror
9+
endif
910

1011
# Select optimisation or debug info
1112
#CXXFLAGS += -O2 -DNDEBUG

src/util/unicode.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ std::wstring utf8_to_utf16(const std::string& in, bool swap_bytes)
324324
{
325325
std::wstring result;
326326
result.reserve(in.size());
327-
int i=0;
327+
std::string::size_type i=0;
328328
while(i<in.size())
329329
{
330330
unsigned char c=in[i++];

0 commit comments

Comments
 (0)