Index: /trunk/src/VBox/Runtime/VBox/log-vbox.cpp
===================================================================
--- /trunk/src/VBox/Runtime/VBox/log-vbox.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/VBox/log-vbox.cpp	(revision 40934)
@@ -169,5 +169,5 @@
 *******************************************************************************/
 /** The default logger. */
-static PRTLOGGER                    g_pLogger = NULL;
+static PRTLOGGER                    g_pLogger = (PRTLOGGER)NULL;
 /** The default logger groups.
  * This must match LOGGROUP! */
@@ -412,12 +412,12 @@
 # else  /* IN_GUEST */
     /* The user destination is backdoor logging. */
-    rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_USER, "VBox.log");
+    rc = RTLogCreate(&pLogger, 0, (const char *)NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_USER, "VBox.log");
 # endif /* IN_GUEST */
 
 #else /* IN_RING0 */
 # ifndef IN_GUEST
-    rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_FILE, "VBox-ring0.log");
+    rc = RTLogCreate(&pLogger, 0, (const char *)NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_FILE, "VBox-ring0.log");
 # else  /* IN_GUEST */
-    rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_USER, "VBox-ring0.log");
+    rc = RTLogCreate(&pLogger, 0, (const char *)NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_USER, "VBox-ring0.log");
 # endif /* IN_GUEST */
     if (RT_SUCCESS(rc))
@@ -474,4 +474,4 @@
     }
 #endif /* IN_RING0 */
-    return g_pLogger = RT_SUCCESS(rc) ? pLogger : NULL;
+    return g_pLogger = RT_SUCCESS(rc) ? pLogger : (PRTLOGGER)NULL;
 }
Index: /trunk/src/VBox/Runtime/common/misc/handletable.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/handletable.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/misc/handletable.cpp	(revision 40934)
@@ -93,5 +93,5 @@
         pThis->papvLevel1 = (void **)((uint8_t *)pThis + RT_ALIGN(sizeof(*pThis), sizeof(void *)));
     else
-        pThis->papvLevel1 = NULL;
+        pThis->papvLevel1 = (void **)NULL;
     pThis->pfnRetain = pfnRetain;
     pThis->pvRetainUser = pvUser;
@@ -119,5 +119,5 @@
 RTDECL(int) RTHandleTableCreate(PRTHANDLETABLE phHandleTable)
 {
-    return RTHandleTableCreateEx(phHandleTable, RTHANDLETABLE_FLAGS_LOCKED, 1, 65534, NULL, NULL);
+    return RTHandleTableCreateEx(phHandleTable, RTHANDLETABLE_FLAGS_LOCKED, 1, 65534, (PFNRTHANDLETABLERETAIN)NULL, NULL);
 }
 RT_EXPORT_SYMBOL(RTHandleTableCreate);
Index: /trunk/src/VBox/Runtime/common/misc/handletable.h
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/handletable.h	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/misc/handletable.h	(revision 40934)
@@ -166,5 +166,5 @@
             return &paTable[i % RTHT_LEVEL2_ENTRIES];
     }
-    return NULL;
+    return (PRTHTENTRY)NULL;
 }
 
@@ -198,5 +198,5 @@
             return &paTable[i % RTHT_LEVEL2_ENTRIES];
     }
-    return NULL;
+    return (PRTHTENTRYCTX)NULL;
 }
 
Index: /trunk/src/VBox/Runtime/common/misc/handletablectx.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/handletablectx.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/misc/handletablectx.cpp	(revision 40934)
@@ -121,5 +121,5 @@
              */
             rc = VERR_TRY_AGAIN;
-            papvLevel1 = NULL;
+            papvLevel1 = (void **)NULL;
             if (cLevel1)
             {
Index: /trunk/src/VBox/Runtime/common/misc/handletablesimple.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/handletablesimple.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/misc/handletablesimple.cpp	(revision 40934)
@@ -113,5 +113,5 @@
              */
             rc = VERR_TRY_AGAIN;
-            void **papvLevel1 = NULL;
+            void **papvLevel1 = (void **)NULL;
             if (cLevel1)
             {
Index: /trunk/src/VBox/Runtime/common/misc/term.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/term.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/misc/term.cpp	(revision 40934)
@@ -69,5 +69,5 @@
 static uint32_t             g_cCallbacks = 0;
 /** The callback head. */
-static PRTTERMCALLBACKREC   g_pCallbackHead = NULL;
+static PRTTERMCALLBACKREC   g_pCallbackHead = (PRTTERMCALLBACKREC)NULL;
 
 
@@ -161,5 +161,5 @@
          * Search for the specified pfnCallback/pvUser pair.
          */
-        PRTTERMCALLBACKREC pPrev = NULL;
+        PRTTERMCALLBACKREC pPrev = (PRTTERMCALLBACKREC)NULL;
         PRTTERMCALLBACKREC pCur  = g_pCallbackHead;
         while (pCur)
@@ -175,5 +175,5 @@
                 RTSemFastMutexRelease(hFastMutex);
 
-                pCur->pfnCallback = NULL;
+                pCur->pfnCallback = (PFNRTTERMCALLBACK)NULL;
                 RTMemFree(pCur);
                 return VINF_SUCCESS;
Index: /trunk/src/VBox/Runtime/common/misc/thread.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/thread.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/misc/thread.cpp	(revision 40934)
@@ -385,5 +385,5 @@
         RTMemFree(pThread);
     }
-    return NULL;
+    return (PRTTHREADINT)NULL;
 }
 
@@ -538,5 +538,5 @@
 
     AssertMsgFailed(("Thread=%RTthrd\n", Thread));
-    return NULL;
+    return (PRTTHREADINT)NULL;
 }
 
@@ -906,5 +906,5 @@
         }
     }
-    return NULL;
+    return (char *)NULL;
 }
 RT_EXPORT_SYMBOL(RTThreadSelfName);
@@ -922,5 +922,5 @@
     PRTTHREADINT pThread;
     if (Thread == NIL_RTTHREAD)
-        return NULL;
+        return (char *)NULL;
     pThread = rtThreadGet(Thread);
     if (pThread)
@@ -930,5 +930,5 @@
         return szName;
     }
-    return NULL;
+    return (char *)NULL;
 }
 RT_EXPORT_SYMBOL(RTThreadGetName);
Index: /trunk/src/VBox/Runtime/common/path/RTPathAbsDup.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathAbsDup.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathAbsDup.cpp	(revision 40934)
@@ -49,5 +49,5 @@
     if (RT_SUCCESS(rc))
         return RTStrDup(szPath);
-    return NULL;
+    return (char *)NULL;
 }
 
Index: /trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp	(revision 40934)
@@ -53,5 +53,5 @@
     if (RT_SUCCESS(rc))
         return RTStrDup(szPath);
-    return NULL;
+    return (char *)NULL;
 }
 
Index: /trunk/src/VBox/Runtime/common/path/RTPathExt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathExt.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathExt.cpp	(revision 40934)
@@ -43,5 +43,5 @@
 {
     const char *psz = pszPath;
-    const char *pszExt = NULL;
+    const char *pszExt = (char *)NULL;
 
     for (;; psz++)
@@ -52,5 +52,5 @@
 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
             case ':':
-                pszExt = NULL;
+                pszExt = (char *)NULL;
                 break;
 
@@ -58,5 +58,5 @@
 #endif
             case '/':
-                pszExt = NULL;
+                pszExt = (char *)NULL;
                 break;
             case '.':
@@ -68,10 +68,10 @@
                 if (pszExt)
                     return (char *)(void *)pszExt;
-                return NULL;
+                return (char *)NULL;
         }
     }
 
     /* will never get here */
-    return NULL;
+    return (char *)NULL;
 }
 
Index: /trunk/src/VBox/Runtime/common/path/RTPathFilename.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathFilename.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathFilename.cpp	(revision 40934)
@@ -67,5 +67,5 @@
                 if (*pszName)
                     return (char *)(void *)pszName;
-                return NULL;
+                return (char *)NULL;
         }
     }
Index: /trunk/src/VBox/Runtime/common/path/RTPathParse.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathParse.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathParse.cpp	(revision 40934)
@@ -56,5 +56,5 @@
     ssize_t     offRoot = 0;
     const char *pszName = pszPath;
-    const char *pszLastDot = NULL;
+    const char *pszLastDot = (char *)NULL;
 
     for (;; psz++)
Index: /trunk/src/VBox/Runtime/common/path/RTPathRealDup.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathRealDup.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathRealDup.cpp	(revision 40934)
@@ -50,5 +50,5 @@
     if (RT_SUCCESS(rc))
         return RTStrDup(szPath);
-    return NULL;
+    return (char *)NULL;
 }
 
Index: /trunk/src/VBox/Runtime/common/path/RTPathStripExt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathStripExt.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathStripExt.cpp	(revision 40934)
@@ -42,5 +42,5 @@
 RTDECL(void) RTPathStripExt(char *pszPath)
 {
-    char *pszDot = NULL;
+    char *pszDot = (char *)NULL;
     for (;; pszPath++)
     {
@@ -53,5 +53,5 @@
 #endif
             case '/':
-                pszDot = NULL;
+                pszDot = (char *)NULL;
                 break;
             case '.':
Index: /trunk/src/VBox/Runtime/common/path/RTPathStripFilename.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathStripFilename.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/path/RTPathStripFilename.cpp	(revision 40934)
@@ -44,5 +44,5 @@
 {
     char *psz = pszPath;
-    char *pszLastSep = NULL;
+    char *pszLastSep = (char *)NULL;
 
 
Index: /trunk/src/VBox/Runtime/common/rand/randparkmiller.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/rand/randparkmiller.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/rand/randparkmiller.cpp	(revision 40934)
@@ -152,5 +152,5 @@
 
     /* u32Ctx */
-    char *pszNext = NULL;
+    char *pszNext = (char *)NULL;
     uint32_t u32Ctx;
     int rc = RTStrToUInt32Ex(pszState, &pszNext, 16, &u32Ctx);
Index: /trunk/src/VBox/Runtime/common/string/straprintf.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/straprintf.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/straprintf.cpp	(revision 40934)
@@ -132,5 +132,5 @@
 
         /* failure */
-        pArg->psz = NULL;
+        pArg->psz = (char *)NULL;
     }
     return 0;
@@ -153,5 +153,5 @@
     Arg.pszTag      = pszTag;
     szBuf[0] = '\0';
-    int cbRet = (int)RTStrFormatV(strallocoutput, &Arg, NULL, NULL, pszFormat, args);
+    int cbRet = (int)RTStrFormatV(strallocoutput, &Arg, (PFNSTRFORMAT)NULL, NULL, pszFormat, args);
     if (Arg.psz)
     {
@@ -175,5 +175,5 @@
     {
         /* allocation error */
-        *ppszBuffer = NULL;
+        *ppszBuffer = (char *)NULL;
         cbRet = -1;
 
Index: /trunk/src/VBox/Runtime/common/string/strformat.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/strformat.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/strformat.cpp	(revision 40934)
@@ -782,5 +782,5 @@
 
     /* terminate the output */
-    pfnOutput(pvArgOutput, NULL, 0);
+    pfnOutput(pvArgOutput, (const char *)NULL, 0);
 
     return cch;
Index: /trunk/src/VBox/Runtime/common/string/strformatrt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 40934)
@@ -346,5 +346,5 @@
                             return pfnOutput(pvArgOutput, s_szFalse, sizeof(s_szFalse) - 1);
                         /* invalid boolean value */
-                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "!%lld!", u.u64);
+                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "!%lld!", u.u64);
                     }
 
@@ -384,5 +384,5 @@
 
                     case RTSF_IPV4:
-                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                            "%u.%u.%u.%u",
                                            u.Ipv4Addr.au8[0],
@@ -394,5 +394,5 @@
                     {
                         if (VALID_PTR(u.pIpv6Addr))
-                            return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                            return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
                                                u.pIpv6Addr->au8[0],
@@ -418,5 +418,5 @@
                     {
                         if (VALID_PTR(u.pMac))
-                            return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                            return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                "%02x:%02x:%02x:%02x:%02x:%02x",
                                                u.pMac->au8[0],
@@ -437,5 +437,5 @@
                                 case RTNETADDRTYPE_IPV4:
                                     if (u.pNetAddr->uPort == RTNETADDR_PORT_NA)
-                                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                            "%u.%u.%u.%u",
                                                            u.pNetAddr->uAddr.IPv4.au8[0],
@@ -443,5 +443,5 @@
                                                            u.pNetAddr->uAddr.IPv4.au8[2],
                                                            u.pNetAddr->uAddr.IPv4.au8[3]);
-                                    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                                    return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                        "%u.%u.%u.%u:%u",
                                                        u.pNetAddr->uAddr.IPv4.au8[0],
@@ -453,5 +453,5 @@
                                 case RTNETADDRTYPE_IPV6:
                                     if (u.pNetAddr->uPort == RTNETADDR_PORT_NA)
-                                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                            "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
                                                            u.pNetAddr->uAddr.IPv6.au8[0],
@@ -471,5 +471,5 @@
                                                            u.pNetAddr->uAddr.IPv6.au8[14],
                                                            u.pNetAddr->uAddr.IPv6.au8[15]);
-                                    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                                    return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                        "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x %u",
                                                        u.pNetAddr->uAddr.IPv6.au8[0],
@@ -492,5 +492,5 @@
 
                                 case RTNETADDRTYPE_MAC:
-                                    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                                    return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                        "%02x:%02x:%02x:%02x:%02x:%02x",
                                                        u.pNetAddr->uAddr.Mac.au8[0],
@@ -502,5 +502,5 @@
 
                                 default:
-                                    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                                    return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                        "unsupported-netaddr-type=%u", u.pNetAddr->enmType);
 
@@ -515,5 +515,5 @@
                         {
                             /* cannot call RTUuidToStr because of GC/R0. */
-                            return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                            return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                                                u.pUuid->Gen.u32TimeLow,
@@ -664,7 +664,7 @@
                                     {
                                         int i;
-                                        cch += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s%0*x %04x:", off ? "\n" : "", sizeof(pu8) * 2, (uintptr_t)pu8, off);
+                                        cch += RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "%s%0*x %04x:", off ? "\n" : "", sizeof(pu8) * 2, (uintptr_t)pu8, off);
                                         for (i = 0; i < cchWidth && off + i < cchPrecision ; i++)
-                                            cch += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
+                                            cch += RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0,
                                                                off + i < cchPrecision ? !(i & 7) && i ? "-%02x" : " %02x" : "   ", pu8[i]);
                                         while (i++ < cchWidth)
@@ -693,7 +693,7 @@
                                     if (cchPrecision-- > 0)
                                     {
-                                        cch = RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%02x", *pu8++);
+                                        cch = RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "%02x", *pu8++);
                                         for (; cchPrecision > 0; cchPrecision--, pu8++)
-                                            cch += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, " %02x", *pu8);
+                                            cch += RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, " %02x", *pu8);
                                         return cch;
                                     }
@@ -728,5 +728,5 @@
                                 return pfnOutput(pvArgOutput, pMsg->pszMsgFull,strlen(pMsg->pszMsgFull));
                             case 'a':
-                                return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (0x%08X) - %s", pMsg->pszDefine, hrc, pMsg->pszMsgFull);
+                                return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "%s (0x%08X) - %s", pMsg->pszDefine, hrc, pMsg->pszMsgFull);
                             default:
                                 AssertMsgFailed(("Invalid status code format type '%.10s'!\n", pszFormatOrg));
@@ -762,5 +762,5 @@
                         return pfnOutput(pvArgOutput, pMsg->pszMsgFull,   strlen(pMsg->pszMsgFull));
                     case 'a':
-                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (%d) - %s", pMsg->pszDefine, rc, pMsg->pszMsgFull);
+                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "%s (%d) - %s", pMsg->pszDefine, rc, pMsg->pszMsgFull);
                     default:
                         AssertMsgFailed(("Invalid status code format type '%.10s'!\n", pszFormatOrg));
@@ -774,5 +774,5 @@
                     case 'f':
                     case 'a':
-                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%d", rc);
+                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "%d", rc);
                     default:
                         AssertMsgFailed(("Invalid status code format type '%.10s'!\n", pszFormatOrg));
@@ -801,10 +801,10 @@
                         return pfnOutput(pvArgOutput, pMsg->pszMsgFull,strlen(pMsg->pszMsgFull));
                     case 'a':
-                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (0x%08X) - %s", pMsg->pszDefine, rc, pMsg->pszMsgFull);
+                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "%s (0x%08X) - %s", pMsg->pszDefine, rc, pMsg->pszMsgFull);
 # else
                     case 'c':
                     case 'f':
                     case 'a':
-                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "0x%08X", rc);
+                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, 0, "0x%08X", rc);
 # endif
                     default:
@@ -911,5 +911,5 @@
                 {
                     case RTST_TIMESPEC:
-                        return RTStrFormat(pfnOutput, pvArgOutput, NULL, NULL, "%'lld ns", RTTimeSpecGetNano(u.pTimeSpec));
+                        return RTStrFormat(pfnOutput, pvArgOutput, (PFNSTRFORMAT)NULL, NULL, "%'lld ns", RTTimeSpecGetNano(u.pTimeSpec));
 
                     default:
Index: /trunk/src/VBox/Runtime/common/string/stringalloc.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/stringalloc.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/stringalloc.cpp	(revision 40934)
@@ -71,5 +71,5 @@
     {
         RTMemFree(pszOld);
-        *ppsz = NULL;
+        *ppsz = (char *)NULL;
     }
     else if (pszOld)
Index: /trunk/src/VBox/Runtime/common/string/strpbrk.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/strpbrk.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/strpbrk.cpp	(revision 40934)
@@ -60,5 +60,5 @@
 
     }
-    return NULL;
+    return (char *)NULL;
 }
 
Index: /trunk/src/VBox/Runtime/common/string/strprintf.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/strprintf.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/strprintf.cpp	(revision 40934)
@@ -100,5 +100,5 @@
 RTDECL(size_t) RTStrPrintfV(char *pszBuffer, size_t cchBuffer, const char *pszFormat, va_list args)
 {
-    return RTStrPrintfExV(NULL, NULL, pszBuffer, cchBuffer, pszFormat, args);
+    return RTStrPrintfExV((PFNSTRFORMAT)NULL, NULL, pszBuffer, cchBuffer, pszFormat, args);
 }
 RT_EXPORT_SYMBOL(RTStrPrintfV);
Index: /trunk/src/VBox/Runtime/common/string/strtonum.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/strtonum.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/strtonum.cpp	(revision 40934)
@@ -261,5 +261,5 @@
 {
     uint64_t u64;
-    int rc = RTStrToUInt64Ex(pszValue, NULL, 0, &u64);
+    int rc = RTStrToUInt64Ex(pszValue, (char **)NULL, 0, &u64);
     if (RT_SUCCESS(rc))
         return u64;
@@ -348,5 +348,5 @@
 {
     uint32_t u32;
-    int rc = RTStrToUInt32Ex(pszValue, NULL, 0, &u32);
+    int rc = RTStrToUInt32Ex(pszValue, (char **)NULL, 0, &u32);
     if (RT_SUCCESS(rc))
         return u32;
@@ -435,5 +435,5 @@
 {
     uint16_t u16;
-    int rc = RTStrToUInt16Ex(pszValue, NULL, 0, &u16);
+    int rc = RTStrToUInt16Ex(pszValue, (char **)NULL, 0, &u16);
     if (RT_SUCCESS(rc))
         return u16;
@@ -522,5 +522,5 @@
 {
     uint8_t u8;
-    int rc = RTStrToUInt8Ex(pszValue, NULL, 0, &u8);
+    int rc = RTStrToUInt8Ex(pszValue, (char **)NULL, 0, &u8);
     if (RT_SUCCESS(rc))
         return u8;
@@ -701,5 +701,5 @@
 {
     int64_t i64;
-    int rc = RTStrToInt64Ex(pszValue, NULL, 0, &i64);
+    int rc = RTStrToInt64Ex(pszValue, (char **)NULL, 0, &i64);
     if (RT_SUCCESS(rc))
         return i64;
@@ -788,5 +788,5 @@
 {
     int32_t i32;
-    int rc = RTStrToInt32Ex(pszValue, NULL, 0, &i32);
+    int rc = RTStrToInt32Ex(pszValue, (char **)NULL, 0, &i32);
     if (RT_SUCCESS(rc))
         return i32;
@@ -875,5 +875,5 @@
 {
     int16_t i16;
-    int rc = RTStrToInt16Ex(pszValue, NULL, 0, &i16);
+    int rc = RTStrToInt16Ex(pszValue, (char **)NULL, 0, &i16);
     if (RT_SUCCESS(rc))
         return i16;
@@ -962,5 +962,5 @@
 {
     int8_t i8;
-    int rc = RTStrToInt8Ex(pszValue, NULL, 0, &i8);
+    int rc = RTStrToInt8Ex(pszValue, (char **)NULL, 0, &i8);
     if (RT_SUCCESS(rc))
         return i8;
Index: /trunk/src/VBox/Runtime/common/string/utf-16.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/utf-16.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/utf-16.cpp	(revision 40934)
@@ -464,5 +464,5 @@
     Assert(VALID_PTR(ppszString));
     Assert(VALID_PTR(pwszString));
-    *ppszString = NULL;
+    *ppszString = (char *)NULL;
 
     /*
@@ -529,5 +529,5 @@
         else
         {
-            *ppsz = NULL;
+            *ppsz = (char *)NULL;
             fShouldFree = true;
             cch = RT_MAX(cch, cchResult + 1);
@@ -824,5 +824,5 @@
     Assert(VALID_PTR(ppszString));
     Assert(VALID_PTR(pwszString));
-    *ppszString = NULL;
+    *ppszString = (char *)NULL;
 
     /*
@@ -889,5 +889,5 @@
         else
         {
-            *ppsz = NULL;
+            *ppsz = (char *)NULL;
             fShouldFree = true;
             cch = RT_MAX(cch, cchResult + 1);
@@ -1003,5 +1003,5 @@
     Assert(VALID_PTR(ppwszString));
     Assert(VALID_PTR(pszString));
-    *ppwszString = NULL;
+    *ppwszString = (PRTUTF16)NULL;
 
     /*
@@ -1071,5 +1071,5 @@
         else
         {
-            *ppwsz = NULL;
+            *ppwsz = (PRTUTF16)NULL;
             fShouldFree = true;
             cwc = RT_MAX(cwcResult + 1, cwc);
Index: /trunk/src/VBox/Runtime/common/string/utf-8.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/utf-8.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/string/utf-8.cpp	(revision 40934)
@@ -275,5 +275,5 @@
 {
     size_t cCodePoints;
-    int rc = rtUtf8Length(psz, RTSTR_MAX, &cCodePoints, NULL);
+    int rc = rtUtf8Length(psz, RTSTR_MAX, &cCodePoints, (size_t *)NULL);
     return RT_SUCCESS(rc) ? cCodePoints : 0;
 }
@@ -284,5 +284,5 @@
 {
     size_t cCodePoints;
-    int rc = rtUtf8Length(psz, cch, &cCodePoints, NULL);
+    int rc = rtUtf8Length(psz, cch, &cCodePoints, (size_t *)NULL);
     if (pcCps)
         *pcCps = RT_SUCCESS(rc) ? cCodePoints : 0;
@@ -390,5 +390,5 @@
     Assert(VALID_PTR(pszString));
     Assert(VALID_PTR(ppaCps));
-    *ppaCps = NULL;
+    *ppaCps = (PRTUNICP)NULL;
 
     /*
@@ -396,5 +396,5 @@
      */
     size_t cCps;
-    int rc = rtUtf8Length(pszString, RTSTR_MAX, &cCps, NULL);
+    int rc = rtUtf8Length(pszString, RTSTR_MAX, &cCps, (size_t *)NULL);
     if (RT_SUCCESS(rc))
     {
@@ -437,5 +437,5 @@
      */
     size_t cCpsResult;
-    int rc = rtUtf8Length(pszString, cchString, &cCpsResult, NULL);
+    int rc = rtUtf8Length(pszString, cchString, &cCpsResult, (size_t *)NULL);
     if (RT_SUCCESS(rc))
     {
@@ -457,5 +457,5 @@
         else
         {
-            *ppaCps = NULL;
+            *ppaCps = (PRTUNICP)NULL;
             fShouldFree = true;
             cCps = RT_MAX(cCpsResult + 1, cCps);
@@ -711,5 +711,5 @@
     Assert(VALID_PTR(ppwszString));
     Assert(VALID_PTR(pszString));
-    *ppwszString = NULL;
+    *ppwszString = (PRTUTF16)NULL;
 
     /*
@@ -779,5 +779,5 @@
         else
         {
-            *ppwsz = NULL;
+            *ppwsz = (PRTUTF16)NULL;
             fShouldFree = true;
             cwc = RT_MAX(cwcResult + 1, cwc);
@@ -901,5 +901,5 @@
     Assert(VALID_PTR(ppszString));
     Assert(VALID_PTR(pszString));
-    *ppszString = NULL;
+    *ppszString = (char *)NULL;
 
     /*
@@ -966,5 +966,5 @@
         else
         {
-            *ppsz = NULL;
+            *ppsz = (char *)NULL;
             fShouldFree = true;
             cch = RT_MAX(cch, cchResult + 1);
@@ -1094,5 +1094,5 @@
     Assert(VALID_PTR(ppszString));
     Assert(VALID_PTR(pszString));
-    *ppszString = NULL;
+    *ppszString = (char *)NULL;
 
     /*
@@ -1162,5 +1162,5 @@
         else
         {
-            *ppsz = NULL;
+            *ppsz = (char *)NULL;
             fShouldFree = true;
             cch = RT_MAX(cchResult + 1, cch);
Index: /trunk/src/VBox/Runtime/common/table/avl_Base.cpp.h
===================================================================
--- /trunk/src/VBox/Runtime/common/table/avl_Base.cpp.h	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/table/avl_Base.cpp.h	(revision 40934)
@@ -118,5 +118,5 @@
 #  define KAVL_NULL     0
 # else
-#  define KAVL_NULL     NULL
+#  define KAVL_NULL     ((PKAVLNODECORE)0)
 # endif
 #endif
@@ -410,5 +410,5 @@
             pDeleteNode = KAVL_GET_POINTER(ppDeleteNode);
         else
-            return NULL;
+            return KAVL_NULL;
 
         kASSERT(AVLStack.cEntries < KAVL_MAX_STACK);
Index: /trunk/src/VBox/Runtime/common/table/avl_Get.cpp.h
===================================================================
--- /trunk/src/VBox/Runtime/common/table/avl_Get.cpp.h	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/table/avl_Get.cpp.h	(revision 40934)
@@ -49,5 +49,5 @@
                     pNode = KAVL_GET_POINTER(&pNode->pLeft);
                 else
-                    return NULL;
+                    return KAVL_NULL;
             }
             else
@@ -56,5 +56,5 @@
                     pNode = KAVL_GET_POINTER(&pNode->pRight);
                 else
-                    return NULL;
+                    return KAVL_NULL;
             }
         }
Index: /trunk/src/VBox/Runtime/common/table/avl_GetBestFit.cpp.h
===================================================================
--- /trunk/src/VBox/Runtime/common/table/avl_GetBestFit.cpp.h	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/table/avl_GetBestFit.cpp.h	(revision 40934)
@@ -47,5 +47,5 @@
     if (pNode)
     {
-        PKAVLNODECORE           pNodeLast = NULL;
+        PKAVLNODECORE           pNodeLast = KAVL_NULL;
         if (fAbove)
         {   /* pNode->Key >= Key */
Index: /trunk/src/VBox/Runtime/common/time/time.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/time/time.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/common/time/time.cpp	(revision 40934)
@@ -383,13 +383,13 @@
      * Validate input.
      */
-    AssertReturn(VALID_PTR(pTimeSpec), NULL);
-    AssertReturn(VALID_PTR(pTime), NULL);
-    AssertReturn(pTime->u32Nanosecond < 1000000000, NULL);
-    AssertReturn(pTime->u8Second < 60, NULL);
-    AssertReturn(pTime->u8Minute < 60, NULL);
-    AssertReturn(pTime->u8Hour < 24, NULL);
-    AssertReturn(pTime->u16YearDay >= 1, NULL);
-    AssertReturn(pTime->u16YearDay <= (rtTimeIsLeapYear(pTime->i32Year) ? 366 : 365), NULL);
-    AssertMsgReturn(pTime->i32Year <= RTTIME_MAX_YEAR && pTime->i32Year >= RTTIME_MIN_YEAR, ("%RI32\n", pTime->i32Year), NULL);
+    AssertReturn(VALID_PTR(pTimeSpec), (PRTTIMESPEC)NULL);
+    AssertReturn(VALID_PTR(pTime), (PRTTIMESPEC)NULL);
+    AssertReturn(pTime->u32Nanosecond < 1000000000, (PRTTIMESPEC)NULL);
+    AssertReturn(pTime->u8Second < 60, (PRTTIMESPEC)NULL);
+    AssertReturn(pTime->u8Minute < 60, (PRTTIMESPEC)NULL);
+    AssertReturn(pTime->u8Hour < 24, (PRTTIMESPEC)NULL);
+    AssertReturn(pTime->u16YearDay >= 1, (PRTTIMESPEC)NULL);
+    AssertReturn(pTime->u16YearDay <= (rtTimeIsLeapYear(pTime->i32Year) ? 366 : 365), (PRTTIMESPEC)NULL);
+    AssertMsgReturn(pTime->i32Year <= RTTIME_MAX_YEAR && pTime->i32Year >= RTTIME_MIN_YEAR, ("%RI32\n", pTime->i32Year), (PRTTIMESPEC)NULL);
 
     /*
@@ -398,5 +398,5 @@
     i32Days  = g_aoffYear[pTime->i32Year - OFF_YEAR_IDX_0_YEAR]
              + pTime->u16YearDay - 1;
-    AssertMsgReturn(i32Days <= RTTIME_MAX_DAY && i32Days >= RTTIME_MIN_DAY, ("%RI32\n", i32Days), NULL);
+    AssertMsgReturn(i32Days <= RTTIME_MAX_DAY && i32Days >= RTTIME_MIN_DAY, ("%RI32\n", i32Days), (PRTTIMESPEC)NULL);
 
     u32Secs  = pTime->u8Second
@@ -405,6 +405,6 @@
     i64Nanos = (uint64_t)pTime->u32Nanosecond
              + u32Secs * UINT64_C(1000000000);
-    AssertMsgReturn(i32Days != RTTIME_MAX_DAY || i64Nanos <= RTTIME_MAX_DAY_NANO, ("%RI64\n", i64Nanos), NULL);
-    AssertMsgReturn(i32Days != RTTIME_MIN_DAY || i64Nanos >= RTTIME_MIN_DAY_NANO, ("%RI64\n", i64Nanos), NULL);
+    AssertMsgReturn(i32Days != RTTIME_MAX_DAY || i64Nanos <= RTTIME_MAX_DAY_NANO, ("%RI64\n", i64Nanos), (PRTTIMESPEC)NULL);
+    AssertMsgReturn(i32Days != RTTIME_MIN_DAY || i64Nanos >= RTTIME_MIN_DAY_NANO, ("%RI64\n", i64Nanos), (PRTTIMESPEC)NULL);
 
     i64Nanos += i32Days * UINT64_C(86400000000000);
@@ -439,5 +439,5 @@
                         &&  pTime->u8MonthDay,
                         ("date=%d-%d-%d\n", pTime->i32Year, pTime->u8Month, pTime->u8MonthDay),
-                        NULL);
+                        (PRTTIME)NULL);
         while (pTime->u8Month > 12)
         {
@@ -663,8 +663,8 @@
      * Validate that we've got the minimum of stuff handy.
      */
-    AssertReturn(VALID_PTR(pTime), NULL);
-    AssertMsgReturn(!(pTime->fFlags & ~RTTIME_FLAGS_MASK), ("%#x\n", pTime->fFlags), NULL);
-    AssertMsgReturn((pTime->fFlags & RTTIME_FLAGS_TYPE_MASK) != RTTIME_FLAGS_TYPE_LOCAL, ("Use RTTimeLocalNormalize!\n"), NULL);
-    AssertMsgReturn(pTime->offUTC == 0, ("%d; Use RTTimeLocalNormalize!\n", pTime->offUTC), NULL);
+    AssertReturn(VALID_PTR(pTime), (PRTTIME)NULL);
+    AssertMsgReturn(!(pTime->fFlags & ~RTTIME_FLAGS_MASK), ("%#x\n", pTime->fFlags), (PRTTIME)NULL);
+    AssertMsgReturn((pTime->fFlags & RTTIME_FLAGS_TYPE_MASK) != RTTIME_FLAGS_TYPE_LOCAL, ("Use RTTimeLocalNormalize!\n"), (PRTTIME)NULL);
+    AssertMsgReturn(pTime->offUTC == 0, ("%d; Use RTTimeLocalNormalize!\n", pTime->offUTC), (PRTTIME)NULL);
 
     pTime = rtTimeNormalizeInternal(pTime);
@@ -712,5 +712,5 @@
         if (    cch <= 15
             ||  psz[cch - 5] != chSign)
-            return NULL;
+            return (char *)NULL;
     }
     else
@@ -721,5 +721,5 @@
         if (    cch <= 15
             ||  psz[cch - 1] != 'Z')
-            return NULL;
+            return (char *)NULL;
     }
     return psz;
Index: /trunk/src/VBox/Runtime/r0drv/alloc-r0drv.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/alloc-r0drv.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/r0drv/alloc-r0drv.cpp	(revision 40934)
@@ -85,5 +85,5 @@
     int rc = rtR0MemAllocEx(cb, fFlags, &pHdr);
     if (RT_FAILURE(rc))
-        return NULL;
+        return (PRTMEMHDR)NULL;
     return pHdr;
 }
Index: /trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp	(revision 40933)
+++ /trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp	(revision 40934)
@@ -338,5 +338,5 @@
         {
             PRTR0MEMOBJINTERNAL pChild = pMem->uRel.Parent.papMappings[--pMem->uRel.Parent.cMappings];
-            pMem->uRel.Parent.papMappings[pMem->uRel.Parent.cMappings] = NULL;
+            pMem->uRel.Parent.papMappings[pMem->uRel.Parent.cMappings] = (PRTR0MEMOBJINTERNAL)NULL;
 
             /* sanity checks. */
Index: /trunk/src/VBox/Runtime/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/testcase/Makefile.kmk	(revision 40933)
+++ /trunk/src/VBox/Runtime/testcase/Makefile.kmk	(revision 40934)
@@ -293,5 +293,6 @@
 tstRTInlineAsmPIC3_TEMPLATE = VBOXR3TSTEXE
 tstRTInlineAsmPIC3_SOURCES = tstRTInlineAsm.cpp
-tstRTInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
+# with -O3 gcc-4.8 asserts
+tstRTInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer #-O3
 tstRTInlineAsmPIC3_DEFS = PIC
 
