summaryrefslogtreecommitdiff
path: root/libpqpp/pq-connection.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:25:24 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:25:24 +0100
commit216c87cbb7228d9130eead5e374dfd7a11a96b98 (patch)
tree7d17ea551cd6a87cb72f4513588262b9160b2e94 /libpqpp/pq-connection.cpp
parentModern jam lto (diff)
downloadlibdbpp-postgresql-216c87cbb7228d9130eead5e374dfd7a11a96b98.tar.bz2
libdbpp-postgresql-216c87cbb7228d9130eead5e374dfd7a11a96b98.tar.xz
libdbpp-postgresql-216c87cbb7228d9130eead5e374dfd7a11a96b98.zip
Add JT recommended warnings
Diffstat (limited to 'libpqpp/pq-connection.cpp')
-rw-r--r--libpqpp/pq-connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index 46e1917..4b201f5 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -8,7 +8,7 @@
#include <poll.h>
#include <unistd.h>
-NAMEDFACTORY("postgresql", PQ::Connection, DB::ConnectionFactory);
+NAMEDFACTORY("postgresql", PQ::Connection, DB::ConnectionFactory)
static void setup() __attribute__((constructor(101)));
static void
@@ -161,7 +161,7 @@ size_t
PQ::Connection::bulkUploadData(const char * data, size_t len) const
{
int rc;
- while (!(rc = PQputCopyData(conn, data, len))) {
+ while (!(rc = PQputCopyData(conn, data, static_cast<int>(len)))) {
sleep(1);
}
if (rc != 1) {