Add some TD_WARN_UNUSED_RESULT.
GitOrigin-RevId: ba78294b97950402b2e77f942e21b19b2f2b7199
This commit is contained in:
parent
b0a2564b97
commit
5c53ea34f8
@ -42,7 +42,7 @@ class SqliteKeyValue {
|
|||||||
return is_created;
|
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);
|
db_ = std::move(connection);
|
||||||
kv_name_ = std::move(kv_name);
|
kv_name_ = std::move(kv_name);
|
||||||
TRY_STATUS(init(db_, kv_name_));
|
TRY_STATUS(init(db_, kv_name_));
|
||||||
@ -82,7 +82,7 @@ class SqliteKeyValue {
|
|||||||
void close() {
|
void close() {
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
static Status destroy(Slice name) {
|
static Status destroy(Slice name) TD_WARN_UNUSED_RESULT {
|
||||||
return SqliteDb::destroy(name);
|
return SqliteDb::destroy(name);
|
||||||
}
|
}
|
||||||
void close_and_destroy() {
|
void close_and_destroy() {
|
||||||
@ -122,10 +122,10 @@ class SqliteKeyValue {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status begin_transaction() {
|
Status begin_transaction() TD_WARN_UNUSED_RESULT {
|
||||||
return db_.begin_transaction();
|
return db_.begin_transaction();
|
||||||
}
|
}
|
||||||
Status commit_transaction() {
|
Status commit_transaction() TD_WARN_UNUSED_RESULT {
|
||||||
return db_.commit_transaction();
|
return db_.commit_transaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,4 +200,5 @@ void SqliteStatement::StmtDeleter::operator()(sqlite3_stmt *stmt) {
|
|||||||
Status SqliteStatement::last_error() {
|
Status SqliteStatement::last_error() {
|
||||||
return db_->last_error();
|
return db_->last_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
@ -77,4 +77,5 @@ class SqliteStatement {
|
|||||||
|
|
||||||
Status last_error();
|
Status last_error();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
Loading…
x
Reference in New Issue
Block a user