Hi!

Dave Page pravi:
>> ./frm/frmReport.cpp: In member function 'virtual void
>> reportObjectDataDictionaryFactory::GenerateReport(frmReport*, 
>> pgObject*)':
>> ./frm/frmReport.cpp:1335: warning: cannot pass objects of non-POD type
>> 'class wxString' through '...'; call will abort at runtime
> 
> Yeah, these ones only fail on GCC - it's complaining about passing a
> wxString as a parameter to a variadic function. The fix is to use the
> c_str() member, eg.

The above warnings are now gone, but I noticed these now:

./frm/frmEditGrid.cpp: In member function ‘void sqlTable::Paste()’:
./frm/frmEditGrid.cpp:1840: warning: comparison between signed and
unsigned integer expressions
./frm/frmEditGrid.cpp:1841: warning: comparison between signed and
unsigned integer expressions
./frm/frmEditGrid.cpp:1856: warning: comparison between signed and
unsigned integer expressions
./frm/frmEditGrid.cpp:1857: warning: comparison between signed and
unsigned integer expressions

The attached patch is yet another "works for me" kind of patch, I don't
know what good/standard C++ practice is in such situations, considering
I don't know C++ at all :)

Regards,
Miha

--
"... the small primitive tribes joined up and became huge, powerful
primitive tribes with more sophisticated weapons."
  -- Terry Pratchett, Small Gods
Index: src/frm/frmEditGrid.cpp
===================================================================
--- src/frm/frmEditGrid.cpp	(revision 5211)
+++ src/frm/frmEditGrid.cpp	(working copy)
@@ -1837,8 +1837,8 @@
     skipSerial = false;
 
     for (col = 0; col < nCols; col++) {
-        if ((unsigned int)columns[col].type == PGOID_TYPE_SERIAL ||
-            (unsigned int)columns[col].type == PGOID_TYPE_SERIAL8)
+        if ((unsigned int)columns[col].type == (unsigned int)PGOID_TYPE_SERIAL ||
+            (unsigned int)columns[col].type == (unsigned int)PGOID_TYPE_SERIAL8)
         {
             wxMessageDialog msg(GetView()->GetParent(),
                 _("This table contains serial columns. Do you want to use the values in the clipboard for these columns?"),
@@ -1853,8 +1853,8 @@
 
     for (col = (hasOids ? 1 : 0); col < nCols && col < (int)data.GetCount(); col++)
     {
-        if (!(skipSerial && ((unsigned int)columns[col].type == PGOID_TYPE_SERIAL ||
-            (unsigned int)columns[col].type == PGOID_TYPE_SERIAL8)))
+        if (!(skipSerial && ((unsigned int)columns[col].type == (unsigned int)PGOID_TYPE_SERIAL ||
+            (unsigned int)columns[col].type == (unsigned int)PGOID_TYPE_SERIAL8)))
         {
             SetValue(row, col, data.Item(col));
         }
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to