You didn't share the function that warning references, and the identifier db1 is not present in the current TFS Github or my old 36-40 era sources. Taking a wild guess it's related to
this?
C++:
Database* db1 = Database::getInstance();
std::ostringstream query1;
query1 << "SELECT `account_id` FROM `players` WHERE `id` = " << guid;
DBResult_ptr result = db1->storeQuery(query1.str());
ownerAcc = result->getNumber<uint32_t>("account_id");
In that case, the issue is the compiler is having difficult recognizing the
member access operator as actually referencing db1, so it thinks db1 is not doing anything and should be removed. That's clearly not the case, so you can safely ignore this warning.
You could also get experimental and try
DBResult_ptr result = (*db1).storeQuery(query1.str());
and if that doesn't shut it up you could go full explicit by dropping that
line 1 entirely and using
DBResult_ptr result = Database::getInstance().storeQuery(query1.str());
for
line 4.
But I'd just ignore it.