From 3ae004e9c8291edc2276068df4dbbc9669ea23be Mon Sep 17 00:00:00 2001 From: orges Date: Sun, 10 Aug 2014 15:53:16 +0300 Subject: [PATCH] some warnings fixed --- Makefile | 4 ++-- cmd/pgnosqlcommand.cpp | 3 +-- cmd/pgnosqlcommand.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1766776..e7632ac 100755 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ server.app: server.o pgconnection.o configure.o pgnosqlserver.o @echo "Linking Objects" @echo "===============" @echo "" - $(CC) --std=gnu++11 -o $@ $^ $(LDFLAGS) + $(CC) --std=gnu++11 -Wall -O3 -o $@ $^ $(LDFLAGS) rm *.o server.o: connect/pgconnection.cpp config/configure.cpp cmd/pgnosqlcommand.cpp server/pgnosqlserver.cpp server/server.cpp @@ -19,7 +19,7 @@ server.o: connect/pgconnection.cpp config/configure.cpp cmd/pgnosqlcommand.cpp s @echo "Compiling Sources" @echo "=================" @echo "" - $(CC) --std=gnu++11 -c $(CFLAGS) $^ + $(CC) --std=gnu++11 -Wall -O3 -c $(CFLAGS) $^ .PHONY: clean diff --git a/cmd/pgnosqlcommand.cpp b/cmd/pgnosqlcommand.cpp index 2b2266d..0c8d42e 100755 --- a/cmd/pgnosqlcommand.cpp +++ b/cmd/pgnosqlcommand.cpp @@ -89,7 +89,7 @@ bool Command::tokenize() { return true; } -bool Command::paramNumCheckOK(short min, short max) { +bool Command::paramNumCheckOK(std::size_t min, std::size_t max) { return ((tokenList.size() >= min) && (tokenList.size() <= max)); } @@ -235,7 +235,6 @@ std::string Command::modholder() { throw CommandParameterError(); std::string ret; std::string indexType; - bool firstLevelIndex = true; boost::to_upper(tokenList[ MAXARGMODHOLDER - 3]); tokenList[ MAXARGMODHOLDER - 4] = "jsstore_" + tokenList[ MAXARGMODHOLDER - 4]; diff --git a/cmd/pgnosqlcommand.h b/cmd/pgnosqlcommand.h index e00c615..f3da220 100755 --- a/cmd/pgnosqlcommand.h +++ b/cmd/pgnosqlcommand.h @@ -19,7 +19,7 @@ class Command void removeExtraSpaces(std::string &str); void makeProperJsonQuotes(std::string &str); bool tokenize(); - bool paramNumCheckOK(short min, short max); + bool paramNumCheckOK(std::size_t min, std::size_t max); bool isFirstLevelCondition(std::string expr); std::string getPrefix(){ return prefix; } std::string flushall();