Skip to content

Commit

Permalink
Fix some more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Apr 1, 2024
1 parent 2877543 commit a0b5044
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/database/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace db {
bool operator()(const std::unique_ptr< Table > &ptr) { return ptr && ptr->getName() == name; }
};

Database::Database(Backend backend) : m_backend(backend){};
Database::Database(Backend backend) : m_backend(backend){}

void Database::init(const ConnectionParameter &parameter) {
assert(parameter.applicability() == m_backend);
Expand Down
2 changes: 1 addition & 1 deletion src/database/Table.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace db {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ACLTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/BanTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelLinkTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelListenerTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelPropertyTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ConfigTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/DBBan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace server {
// byte address. Thus, the subnet mask that has to be applied to these last 4 bytes also needs to ignore the
// leading 12 bytes = 96 bits.
assert(mask <= 32);
return mask + 96;
return static_cast< std::uint8_t >(mask + 96);
}

bool operator==(const DBBan &lhs, const DBBan &rhs) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/GroupMemberTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/GroupTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/LogTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ServerTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/UserPropertyTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace soci {
class session;
};
}

namespace mumble {
namespace server {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/UserTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace soci {
class session;
};
}

class QByteArray;

Expand Down
2 changes: 1 addition & 1 deletion src/tests/TestDatabase/DatabaseTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ template<> char *toString(const std::unordered_set< std::string > &set) {
return buffer;
}

}; // namespace QTest
} // namespace QTest


class TestDatabase : public Database {
Expand Down
4 changes: 2 additions & 2 deletions src/tests/TestDatabase/server/ServerDatabaseTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ template<> char *toString(const ::msdb::DBUserData &data) {
return buffer;
}

}; // namespace QTest
} // namespace QTest

namespace std {
template< std::size_t size > char *toString(const std::array< std::uint8_t, size > array) {
Expand Down Expand Up @@ -1481,7 +1481,7 @@ void ServerDatabaseTest::banTable_general() {
// Since we re-used the server ID, base address and prefix length, adding this should error
QVERIFY_EXCEPTION_THROWN(table.addBan(ban2), ::mdb::AccessException);

ban2.prefixLength += 1;
ban2.prefixLength += static_cast< std::uint8_t >(1);
QVERIFY(!table.banExists(ban2));
table.addBan(ban2);
QVERIFY(table.banExists(ban2));
Expand Down

0 comments on commit a0b5044

Please sign in to comment.