From 5c53ea34f8718a59778564fd80600244106c82b2 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 18 Jul 2018 00:41:26 +0300 Subject: [PATCH] Add some TD_WARN_UNUSED_RESULT. GitOrigin-RevId: ba78294b97950402b2e77f942e21b19b2f2b7199 --- tddb/td/db/SqliteKeyValue.h | 8 ++++---- tddb/td/db/SqliteStatement.cpp | 1 + tddb/td/db/SqliteStatement.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tddb/td/db/SqliteKeyValue.h b/tddb/td/db/SqliteKeyValue.h index 23a2ec620..53b35c502 100644 --- a/tddb/td/db/SqliteKeyValue.h +++ b/tddb/td/db/SqliteKeyValue.h @@ -42,7 +42,7 @@ class SqliteKeyValue { return is_created; } - Status init_with_connection(SqliteDb connection, string kv_name) { + Status init_with_connection(SqliteDb connection, string kv_name) TD_WARN_UNUSED_RESULT { db_ = std::move(connection); kv_name_ = std::move(kv_name); TRY_STATUS(init(db_, kv_name_)); @@ -82,7 +82,7 @@ class SqliteKeyValue { void close() { clear(); } - static Status destroy(Slice name) { + static Status destroy(Slice name) TD_WARN_UNUSED_RESULT { return SqliteDb::destroy(name); } void close_and_destroy() { @@ -122,10 +122,10 @@ class SqliteKeyValue { return data; } - Status begin_transaction() { + Status begin_transaction() TD_WARN_UNUSED_RESULT { return db_.begin_transaction(); } - Status commit_transaction() { + Status commit_transaction() TD_WARN_UNUSED_RESULT { return db_.commit_transaction(); } diff --git a/tddb/td/db/SqliteStatement.cpp b/tddb/td/db/SqliteStatement.cpp index c9ce8c3e8..d76c2cfcd 100644 --- a/tddb/td/db/SqliteStatement.cpp +++ b/tddb/td/db/SqliteStatement.cpp @@ -200,4 +200,5 @@ void SqliteStatement::StmtDeleter::operator()(sqlite3_stmt *stmt) { Status SqliteStatement::last_error() { return db_->last_error(); } + } // namespace td diff --git a/tddb/td/db/SqliteStatement.h b/tddb/td/db/SqliteStatement.h index 2e2182ff7..dad7d9059 100644 --- a/tddb/td/db/SqliteStatement.h +++ b/tddb/td/db/SqliteStatement.h @@ -77,4 +77,5 @@ class SqliteStatement { Status last_error(); }; + } // namespace td