wxString tmp;
     if (GetPropVal(propName, &tmp))
         return tmp;
-    else
-        return defaultVal;
+
+    return defaultVal;
 }
 
 void wxXmlNode::AddChild(wxXmlNode *child)
 }
 
 wxXmlDocument::wxXmlDocument(const wxString& filename, const wxString& encoding)
-                          : wxObject(), m_root(NULL)
+              :wxObject(), m_root(NULL)
 {
     if ( !Load(filename, encoding) )
     {
 }
 
 wxXmlDocument::wxXmlDocument(wxInputStream& stream, const wxString& encoding)
-                          : wxObject(), m_root(NULL)
+              :wxObject(), m_root(NULL)
 {
     if ( !Load(stream, encoding) )
     {
 }
 
 wxXmlDocument::wxXmlDocument(const wxXmlDocument& doc)
+              :wxObject()
 {
     DoCopy(doc);
 }
         return str;
     }
     else
-        return wxString(s, len);
+        return wxString(s, len != wxSTRING_MAXLEN ? len : strlen(s));
 #endif
 }
 
     // We must build conversion table for expat. The easiest way to do so
     // is to let wxCSConv convert as string containing all characters to
     // wide character representation:
-    wxCSConv conv(wxString(name, wxConvLibc));
+    wxString str(name, wxConvLibc);
+    wxCSConv conv(str);
     char mbBuf[2];
     wchar_t wcBuf[10];
     size_t i;
         }
         info->map[i+1] = (int)wcBuf[0];
     }
-    
+
     info->data = NULL;
     info->convert = NULL;
     info->release = NULL;
 
 // write string to output:
 inline static void OutputString(wxOutputStream& stream, const wxString& str,
-                                wxMBConv *convMem, wxMBConv *convFile)
+#if wxUSE_UNICODE
+    wxMBConv * WXUNUSED(convMem),
+#else
+    wxMBConv *convMem,
+#endif
+    wxMBConv *convFile)
 {
     if (str.IsEmpty()) return;
 #if wxUSE_UNICODE