Release version type check introduced a compiler warning
Under Ubuntu 18.04, I now get warnings like this:
mv -f .deps/dhcp6_messages.Tpo .deps/dhcp6_messages.Plo
g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -I../../../src/bin -I../../../src/bin -I../../../src -I../../../src -isystem /opt/boost/boost_1_63_0 -DOS_LINUX -Wno-unused-variable -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cc
main.cc: In function ‘int main(int, char**)’:
main.cc:223:37: warning: comparison with string literal results in unspecified behavior [-Waddress]
if (PACKAGE_VERSION_TYPE == "development") {
This corrects it:
diff --git a/src/bin/dhcp6/main.cc b/src/bin/dhcp6/main.cc
index f24322055a..4e690a6cf4 100644
--- a/src/bin/dhcp6/main.cc
+++ b/src/bin/dhcp6/main.cc
@@ -220,7 +220,7 @@ main(int argc, char* argv[]) {
.arg(VERSION)
.arg(PACKAGE_VERSION_TYPE);
- if (PACKAGE_VERSION_TYPE == "development") {
+ if (std::string(PACKAGE_VERSION_TYPE) == "development") {
LOG_WARN(dhcp6_logger, DHCP6_DEVELOPMENT_VERSION);
}