fix: Resolve compiler warnings across multiple modules

This commit is contained in:
Matej Kenda
2025-12-17 14:04:42 +01:00
parent b79b07c308
commit 7addcfbc81
80 changed files with 324 additions and 315 deletions

View File

@@ -159,7 +159,7 @@ void Binder::bind(std::size_t pos, const Poco::Data::CLOB& val, Direction dir)
void Binder::bind(std::size_t pos, const DateTime& val, Direction dir)
{
poco_assert(dir == PD_IN);
MYSQL_TIME mt = {0};
MYSQL_TIME mt = {};
mt.year = val.year();
mt.month = val.month();
@@ -180,7 +180,7 @@ void Binder::bind(std::size_t pos, const DateTime& val, Direction dir)
void Binder::bind(std::size_t pos, const Date& val, Direction dir)
{
poco_assert(dir == PD_IN);
MYSQL_TIME mt = {0};
MYSQL_TIME mt = {};
mt.year = val.year();
mt.month = val.month();
@@ -197,7 +197,7 @@ void Binder::bind(std::size_t pos, const Date& val, Direction dir)
void Binder::bind(std::size_t pos, const Time& val, Direction dir)
{
poco_assert(dir == PD_IN);
MYSQL_TIME mt = {0};
MYSQL_TIME mt = {};
mt.hour = val.hour();
mt.minute = val.minute();
@@ -286,7 +286,7 @@ void Binder::realBind(std::size_t pos, enum_field_types type, const void* buffer
std::memset(&_bindArray[s], 0, sizeof(MYSQL_BIND) * (_bindArray.size() - s));
}
MYSQL_BIND b = {nullptr};
MYSQL_BIND b = {};
b.buffer_type = type;
b.buffer = const_cast<void*>(buffer);

View File

@@ -186,7 +186,7 @@ bool Extractor::extract(std::size_t pos, Poco::Data::CLOB& val)
bool Extractor::extract(std::size_t pos, DateTime& val)
{
MYSQL_TIME mt = {0};
MYSQL_TIME mt = {};
if (!realExtractFixed(pos, MYSQL_TYPE_DATETIME, &mt))
return false;
@@ -198,7 +198,7 @@ bool Extractor::extract(std::size_t pos, DateTime& val)
bool Extractor::extract(std::size_t pos, Date& val)
{
MYSQL_TIME mt = {0};
MYSQL_TIME mt = {};
if (!realExtractFixed(pos, MYSQL_TYPE_DATE, &mt))
return false;
@@ -210,7 +210,7 @@ bool Extractor::extract(std::size_t pos, Date& val)
bool Extractor::extract(std::size_t pos, Time& val)
{
MYSQL_TIME mt = {0};
MYSQL_TIME mt = {};
if (!realExtractFixed(pos, MYSQL_TYPE_TIME, &mt))
return false;
@@ -265,7 +265,7 @@ void Extractor::reset()
bool Extractor::realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, bool isUnsigned)
{
MYSQL_BIND bind = {nullptr};
MYSQL_BIND bind = {};
my_bool isNull = 0;
bind.is_null = &isNull;