aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--makefile7
-rw-r--r--zxcvbn.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/makefile b/makefile
index 1d7cc59..2cf5c9e 100644
--- a/makefile
+++ b/makefile
@@ -1,5 +1,5 @@
-CFLAGS = -O2 -Wall -Wextra -Wdeclaration-after-statement
-CPPFLAGS = -O2 -Wall -Wextra
+CFLAGS ?= -O2 -Wall -Wextra -Wdeclaration-after-statement
+CPPFLAGS ?= -O2 -Wall -Wextra
# need zxcvbn.h prior to package installation
CFLAGS += -I.
@@ -84,6 +84,7 @@ test: test-file test-inline test-c++inline test-c++file test-shlib test-statlib
clean:
rm -f test-file zxcvbn-file.o test-c++file zxcvbn-c++file.o
- rm -f test-inline zxcvbn-inline.o zxcvbn-inline-pic.o test-c++inline zxcvbn-c++inline.o
+ rm -f test-inline zxcvbn-inline.o test-c++inline zxcvbn-c++inline.o
+ rm -f dict-*.h zxcvbn.dict zxcvbn.cpp test.cpp
rm -f dictgen
rm -f ${TARGET_LIB} ${SONAME} libzxcvbn.so test-shlib libzxcvbn.a test-statlib
diff --git a/zxcvbn.c b/zxcvbn.c
index aa0a881..bfb40b3 100644
--- a/zxcvbn.c
+++ b/zxcvbn.c
@@ -212,7 +212,7 @@ static inline void MyOpenFile(FileHandle & f, const char *Name)
}
static inline bool MyReadFile(FileHandle & f, void *Buf, unsigned int Num)
{
- return f.read((char *)Buf, Num);
+ return (bool)f.read((char *)Buf, Num);
}
static inline void MyCloseFile(FileHandle & f)
{