summaryrefslogtreecommitdiff
path: root/libmysqlpp/my-command.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:24:56 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:24:56 +0100
commit7b56849be41fdd342c8d92c243df6370a53c8305 (patch)
tree47621c380edfd8adc779caab5d961868be78526c /libmysqlpp/my-command.cpp
parentReplace straggling typedef (diff)
downloadlibdbpp-mysql-7b56849be41fdd342c8d92c243df6370a53c8305.tar.bz2
libdbpp-mysql-7b56849be41fdd342c8d92c243df6370a53c8305.tar.xz
libdbpp-mysql-7b56849be41fdd342c8d92c243df6370a53c8305.zip
Add JT recommended warnings
Diffstat (limited to 'libmysqlpp/my-command.cpp')
-rw-r--r--libmysqlpp/my-command.cpp16
1 files changed, 8 insertions, 8 deletions
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<unsigned int>(v.time_of_day().hours());
+ ts.minute = static_cast<unsigned int>(v.time_of_day().minutes());
+ ts.second = static_cast<unsigned int>(v.time_of_day().seconds());
+ ts.second_part = static_cast<long unsigned int>(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<unsigned int>(v.hours());
+ ts.minute = static_cast<unsigned int>(v.minutes());
+ ts.second = static_cast<unsigned int>(v.seconds());
+ ts.second_part = static_cast<long unsigned int>(v.total_microseconds() % 1000000U);
ts.neg = (v.is_negative() ? 1 : 0);
}
void