From: Vadim Zeitlin Date: Sun, 25 Jun 2006 23:47:50 +0000 (+0000) Subject: fix gcc warnings about in printf format (partly modified patch 1500717) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d595fb29c93249b72930cad9a85a5c237a8ceff7 fix gcc warnings about in printf format (partly modified patch 1500717) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/db.cpp b/src/common/db.cpp index d0b9bf6499..b1640ae1dd 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -1755,8 +1755,9 @@ void wxDb::Close(void) tiu = (wxTablesInUse *)pNode->GetData(); if (tiu->pDb == this) { - s.Printf(wxT("(%-20s) tableID:[%6lu] pDb:[%p]"), tiu->tableName,tiu->tableID,tiu->pDb); - s2.Printf(wxT("Orphaned table found using pDb:[%p]"),this); + s.Printf(wxT("(%-20s) tableID:[%6lu] pDb:[%p]"), + tiu->tableName, tiu->tableID, wx_static_cast(void*, tiu->pDb)); + s2.Printf(wxT("Orphaned table found using pDb:[%p]"), wx_static_cast(void*, this)); wxLogDebug(s.c_str(),s2.c_str()); } pNode = pNode->GetNext(); diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 346dcd34f9..7824b72820 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -186,7 +186,8 @@ bool wxDbTable::initialize(wxDb *pwxDb, const wxString &tblName, const UWORD num wxString s; tableID = ++lastTableID; - s.Printf(wxT("wxDbTable constructor (%-20s) tableID:[%6lu] pDb:[%p]"), tblName.c_str(), tableID, pDb); + s.Printf(wxT("wxDbTable constructor (%-20s) tableID:[%6lu] pDb:[%p]"), + tblName.c_str(), tableID, wx_static_cast(void*, pDb)); #ifdef __WXDEBUG__ wxTablesInUse *tableInUse; @@ -309,7 +310,8 @@ void wxDbTable::cleanup() wxString s; if (pDb) { - s.Printf(wxT("wxDbTable destructor (%-20s) tableID:[%6lu] pDb:[%p]"), tableName.c_str(), tableID, pDb); + s.Printf(wxT("wxDbTable destructor (%-20s) tableID:[%6lu] pDb:[%p]"), + tableName.c_str(), tableID, wx_static_cast(void*, pDb)); pDb->WriteSqlLog(s); } diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 553a3f445b..fae2059278 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -1650,12 +1650,12 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup) wxLogTrace( FILECONF_TRACE_MASK, _T(" (m_pLine) = prev: %p, this %p, next %p"), - ((m_pLine) ? m_pLine->Prev() : 0), + m_pLine ? m_pLine->Prev() : NULL, m_pLine, - ((m_pLine) ? m_pLine->Next() : 0) ); + m_pLine ? m_pLine->Next() : NULL ); wxLogTrace( FILECONF_TRACE_MASK, _T(" text: '%s'"), - ((m_pLine) ? m_pLine->Text().c_str() : wxEmptyString) ); + m_pLine ? m_pLine->Text().c_str() : wxEmptyString ); // delete all entries... size_t nCount = pGroup->m_aEntries.Count(); diff --git a/src/common/variant.cpp b/src/common/variant.cpp index a1e7f8a8c3..06ef8faf22 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -985,7 +985,7 @@ bool wxVariantDataWxObjectPtr::Write(wxSTD ostream& str) const bool wxVariantDataWxObjectPtr::Write(wxString& str) const { - str.Printf(wxT("%s(%p)"), GetType().c_str(), m_value); + str.Printf(wxT("%s(%p)"), GetType().c_str(), wx_static_cast(void*, m_value)); return true; }