Warning fixes, source cleaning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-12-29 21:19:39 +00:00
parent eb3e6de33b
commit d8d267726a
2 changed files with 20 additions and 19 deletions

View File

@@ -579,7 +579,7 @@ const wxChar *wxDb::convertUserID(const wxChar *userID, wxString &UserID)
bool wxDb::determineDataTypes(bool failOnDataTypeUnsupported) bool wxDb::determineDataTypes(bool failOnDataTypeUnsupported)
{ {
int iIndex; size_t iIndex;
// These are the possible SQL types we check for use against the datasource we are connected // These are the possible SQL types we check for use against the datasource we are connected
// to for the purpose of determining which data type to use for the basic character strings // to for the purpose of determining which data type to use for the basic character strings

View File

@@ -792,7 +792,8 @@ bool wxDbTable::Open(bool checkPrivileges, bool checkTableExists)
else if (checkPrivileges) else if (checkPrivileges)
{ {
// Verify the user has rights to access the table. // Verify the user has rights to access the table.
bool hasPrivs = true; bool hasPrivs wxDUMMY_INITIALIZE(true);
if (pDb->Dbms() == dbmsPOSTGRES) if (pDb->Dbms() == dbmsPOSTGRES)
hasPrivs = pDb->TablePrivileges(tableName, wxT("SELECT"), pDb->GetUsername(), NULL, tablePath); hasPrivs = pDb->TablePrivileges(tableName, wxT("SELECT"), pDb->GetUsername(), NULL, tablePath);
else else
@@ -802,11 +803,11 @@ bool wxDbTable::Open(bool checkPrivileges, bool checkTableExists)
s = wxT("Connecting user does not have sufficient privileges to access this table.\n"); s = wxT("Connecting user does not have sufficient privileges to access this table.\n");
} }
if (!s.IsEmpty()) if (!s.empty())
{ {
wxString p; wxString p;
if (!tablePath.IsEmpty()) if (!tablePath.empty())
p.Printf(wxT("Error opening '%s/%s'.\n"),tablePath.c_str(),tableName.c_str()); p.Printf(wxT("Error opening '%s/%s'.\n"),tablePath.c_str(),tableName.c_str());
else else
p.Printf(wxT("Error opening '%s'.\n"), tableName.c_str()); p.Printf(wxT("Error opening '%s'.\n"), tableName.c_str());