aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-07-25 21:51:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-07-25 21:51:12 +0200
commitb9ebf41d9c7fbc9d8ef3b9a73abac4148e5b106a (patch)
tree4e68153df0406417b7ebbafb14fafd1caae219a4
parent979573601895c9abd83056efeb8088b1744bc614 (diff)
Suppress warnings
-rw-r--r--odb/pgsql/connection.cxx12
-rw-r--r--odb/pgsql/statement.cxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/odb/pgsql/connection.cxx b/odb/pgsql/connection.cxx
index f65cba4..36a5713 100644
--- a/odb/pgsql/connection.cxx
+++ b/odb/pgsql/connection.cxx
@@ -17,15 +17,15 @@
using namespace std;
+extern "C" void
+odb_pgsql_process_notice (void*, const char*)
+{
+}
+
namespace odb
{
namespace pgsql
{
- static void
- nop_process_notice (void*, const char*)
- {
- }
-
connection::
connection (database_type& db)
: db_ (db),
@@ -46,7 +46,7 @@ namespace odb
// Suppress server notifications to stdout.
//
- PQsetNoticeProcessor (handle_, &nop_process_notice, 0);
+ PQsetNoticeProcessor (handle_, &odb_pgsql_process_notice, 0);
// Establish whether date/time values are represented as
// 8-byte integers.
diff --git a/odb/pgsql/statement.cxx b/odb/pgsql/statement.cxx
index c1de28d..f9a4fb7 100644
--- a/odb/pgsql/statement.cxx
+++ b/odb/pgsql/statement.cxx
@@ -97,7 +97,7 @@ namespace odb
n.values[i] = reinterpret_cast<char*> (current_bind.buffer);
- size_t l;
+ size_t l (0);
switch (current_bind.type)
{
@@ -458,7 +458,7 @@ namespace odb
native_data_.formats,
1));
PGresult* h (r.get ());
- ExecStatusType stat;
+ ExecStatusType stat (PGRES_FATAL_ERROR);
if (!is_good_result (h, &stat))
{