mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-02 10:43:22 +01:00
fix: Resolve compiler warnings across multiple modules
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user