summaryrefslogtreecommitdiff
path: root/libodb
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-04-23 06:12:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-04-23 06:12:20 +0200
commit1e653e1b10f19454cd2dac621fd5bb1f19a7aeac (patch)
treefebff04110a4f5b03275915ce61fe09163c88f4f /libodb
parent45e78bf8e308cd5f01ba886dad2a756c3ef90370 (diff)
Suppress bunch of unused/uninitialized warnings
Diffstat (limited to 'libodb')
-rw-r--r--libodb/odb/nullable.hxx8
-rw-r--r--libodb/odb/transaction.cxx2
2 files changed, 6 insertions, 4 deletions
diff --git a/libodb/odb/nullable.hxx b/libodb/odb/nullable.hxx
index 75f5892..faa55c4 100644
--- a/libodb/odb/nullable.hxx
+++ b/libodb/odb/nullable.hxx
@@ -197,7 +197,7 @@ namespace odb
nullable (const nullable& y)
: null_ (y.null_)
{
- if (!null_)
+ if (!y.null_)
new (&value_) T (y.value_);
}
@@ -206,7 +206,7 @@ namespace odb
nullable (nullable&& y)
: null_ (y.null_)
{
- if (!null_)
+ if (!y.null_)
new (&value_) T (std::move (y.value_));
}
@@ -216,7 +216,7 @@ namespace odb
nullable (const nullable<Y>& y)
: null_ (y.null_)
{
- if (!null_)
+ if (!y.null_)
new (&value_) T (y.value_);
}
@@ -226,7 +226,7 @@ namespace odb
nullable (nullable<Y>&& y)
: null_ (y.null_)
{
- if (!null_)
+ if (!y.null_)
new (&value_) T (std::move (y.value_));
}
diff --git a/libodb/odb/transaction.cxx b/libodb/odb/transaction.cxx
index f75cf32..03810a1 100644
--- a/libodb/odb/transaction.cxx
+++ b/libodb/odb/transaction.cxx
@@ -5,6 +5,7 @@
#include <odb/exceptions.hxx>
#include <odb/details/tls.hxx>
+#include <odb/details/unused.hxx>
using namespace std;
@@ -335,6 +336,7 @@ namespace odb
connection& transaction_impl::
connection (database_type* db)
{
+ ODB_POTENTIALLY_UNUSED (db);
assert (db == 0 || db == &database_);
return *connection_;
}