]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/init.cpp
added support for POST method and alternate ports (part of patch 649438)
[wxWidgets.git] / src / common / init.cpp
index 14d60569292511b2f65d035f2bf02436e8855408..c25c12cd866653d23ffe38d4378390e24f76515a 100644 (file)
@@ -111,6 +111,15 @@ public:
     ~wxCleanupOnExit() { wxEntryCleanup(); }
 };
 
+// ----------------------------------------------------------------------------
+// private functions
+// ----------------------------------------------------------------------------
+
+// suppress warnings about unused variables
+static inline void Use(void *) { }
+
+#define WX_SUPPRESS_UNUSED_WARN(x) Use(&x)
+
 // ----------------------------------------------------------------------------
 // initialization data
 // ----------------------------------------------------------------------------
@@ -380,8 +389,10 @@ int wxEntryReal(int& argc, wxChar **argv)
     // below returns or throws
     wxCleanupOnExit cleanupOnExit;
 
+    WX_SUPPRESS_UNUSED_WARN(cleanupOnExit);
+
     // app initialization
-    if ( !wxTheApp->OnInit() )
+    if ( !wxTheApp->CallOnInit() )
     {
         // don't call OnExit() if OnInit() failed
         return -1;
@@ -427,8 +438,11 @@ int wxEntry(int& argc, wxChar **argv)
     {
         ::ExitProcess(3); // the same exit code as abort()
 
+#if !defined(_MSC_VER) || _MSC_VER < 1300
         // this code is unreachable but put it here to suppress warnings
+        // from some compilers
         return -1;
+#endif
     }
 }