From 87d2edcbd28e04b459161d045be1e2bebeddfe8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Mon, 14 Jun 2021 23:32:37 +0200 Subject: [PATCH] #3090: Do not initialize value with undefined behavior --- Data/ODBC/ODBC.make | 3 --- Data/ODBC/include/Poco/Data/ODBC/Extractor.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Data/ODBC/ODBC.make b/Data/ODBC/ODBC.make index 1a25ead7c..fc5797db1 100644 --- a/Data/ODBC/ODBC.make +++ b/Data/ODBC/ODBC.make @@ -56,9 +56,6 @@ else ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libiodbc$(LIBLINKEXT); echo $$?)) SYSLIBS += -liodbc -liodbcinst COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc -# TODO: OSX >= 10.8 deprecated non-Unicode ODBC API functions, silence warnings until iODBC Unicode support -COMMONFLAGS += -Wno-deprecated-declarations - else $(error No ODBC library found. Please install unixODBC or iODBC or specify POCO_ODBC_LIB and try again) endif diff --git a/Data/ODBC/include/Poco/Data/ODBC/Extractor.h b/Data/ODBC/include/Poco/Data/ODBC/Extractor.h index c8c8f8a49..16ea981cd 100644 --- a/Data/ODBC/include/Poco/Data/ODBC/Extractor.h +++ b/Data/ODBC/include/Poco/Data/ODBC/Extractor.h @@ -462,7 +462,7 @@ private: bool extractManualImpl(std::size_t pos, T& val, SQLSMALLINT cType) { SQLRETURN rc = 0; - T value = (T) 0; + T value{}; resizeLengths(pos);