]> git.saurik.com Git - wxWidgets.git/commitdiff
fix gcc warnings about in printf format (partly modified patch 1500717)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jun 2006 23:47:50 +0000 (23:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jun 2006 23:47:50 +0000 (23:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/db.cpp
src/common/dbtable.cpp
src/common/fileconf.cpp
src/common/variant.cpp

index d0b9bf6499d737cbef616da81d63cd464297270f..b1640ae1dd64923f96c30c87dab9cb68b2f27647 100644 (file)
@@ -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();
index 346dcd34f9d09b01ad5ffc854f8351134d66edc4..7824b7282065e3ed163c80f6e92329a5cdaf0d65 100644 (file)
@@ -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);
     }
 
index 553a3f445befeef3cb5eadccb9d7a6d29f132e46..fae2059278557f7d889d7d8583192409aee08d43 100644 (file)
@@ -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();
index a1e7f8a8c371eaf6d7e20ea8708ef79f45264134..06ef8faf227e71641815f8924d555940a18227eb 100644 (file)
@@ -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;
 }