From 7b56849be41fdd342c8d92c243df6370a53c8305 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 18 Sep 2021 14:24:56 +0100 Subject: Add JT recommended warnings --- libmysqlpp/my-command.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libmysqlpp/my-command.cpp') diff --git a/libmysqlpp/my-command.cpp b/libmysqlpp/my-command.cpp index 7e7275a..114e526 100644 --- a/libmysqlpp/my-command.cpp +++ b/libmysqlpp/my-command.cpp @@ -124,10 +124,10 @@ MySQL::Command::bindParamT(unsigned int n, const boost::posix_time::ptime & v) ts.year = v.date().year(); ts.month = v.date().month(); ts.day = v.date().day(); - ts.hour = v.time_of_day().hours(); - ts.minute = v.time_of_day().minutes(); - ts.second = v.time_of_day().seconds(); - ts.second_part = v.time_of_day().total_microseconds() % 1000000; + ts.hour = static_cast(v.time_of_day().hours()); + ts.minute = static_cast(v.time_of_day().minutes()); + ts.second = static_cast(v.time_of_day().seconds()); + ts.second_part = static_cast(v.time_of_day().total_microseconds() % 1000000U); ts.neg = false; } void @@ -140,10 +140,10 @@ MySQL::Command::bindParamT(unsigned int n, const boost::posix_time::time_duratio ts.year = 0; ts.month = 0; ts.day = 0; - ts.hour = v.hours(); - ts.minute = v.minutes(); - ts.second = v.seconds(); - ts.second_part = v.total_microseconds() % 1000000; + ts.hour = static_cast(v.hours()); + ts.minute = static_cast(v.minutes()); + ts.second = static_cast(v.seconds()); + ts.second_part = static_cast(v.total_microseconds() % 1000000U); ts.neg = (v.is_negative() ? 1 : 0); } void -- cgit v1.2.3