Add some TD_WARN_UNUSED_RESULT.

GitOrigin-RevId: ba78294b97950402b2e77f942e21b19b2f2b7199
This commit is contained in:
levlam 2018-07-18 00:41:26 +03:00
parent b0a2564b97
commit 5c53ea34f8
3 changed files with 6 additions and 4 deletions

View File

@ -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();
}

View File

@ -200,4 +200,5 @@ void SqliteStatement::StmtDeleter::operator()(sqlite3_stmt *stmt) {
Status SqliteStatement::last_error() {
return db_->last_error();
}
} // namespace td

View File

@ -77,4 +77,5 @@ class SqliteStatement {
Status last_error();
};
} // namespace td