Index: /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp	(revision 78178)
+++ /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp	(revision 78179)
@@ -61,5 +61,5 @@
  * @param   pCtx    The context.
  */
-static int vboxClipboardChanged (VBOXCLIPBOARDCONTEXT *pCtx)
+static int vboxClipboardChanged(VBOXCLIPBOARDCONTEXT *pCtx)
 {
     if (pCtx->pClient == NULL)
@@ -69,9 +69,9 @@
     bool fChanged = false;
     /* Retrieve the formats currently in the clipboard and supported by vbox */
-    int rc = queryNewPasteboardFormats (pCtx->pasteboard, &fFormats, &fChanged);
-    if (RT_SUCCESS (rc) && fChanged)
-    {
-        vboxSvcClipboardReportMsg (pCtx->pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, fFormats);
-        Log (("vboxClipboardChanged fFormats %02X\n", fFormats));
+    int rc = queryNewPasteboardFormats(pCtx->pasteboard, &fFormats, &fChanged);
+    if (RT_SUCCESS(rc) && fChanged)
+    {
+        vboxSvcClipboardReportMsg(pCtx->pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, fFormats);
+        Log(("vboxClipboardChanged fFormats %02X\n", fFormats));
     }
 
@@ -90,10 +90,10 @@
  *
  */
-static int vboxClipboardThread (RTTHREAD ThreadSelf, void *pvUser)
-{
-    Log (("vboxClipboardThread: starting clipboard thread\n"));
-
-    AssertPtrReturn (pvUser, VERR_INVALID_PARAMETER);
-    VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *) pvUser;
+static int vboxClipboardThread(RTTHREAD ThreadSelf, void *pvUser)
+{
+    Log(("vboxClipboardThread: starting clipboard thread\n"));
+
+    AssertPtrReturn(pvUser, VERR_INVALID_PARAMETER);
+    VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)pvUser;
 
     while (!pCtx->fTerminate)
@@ -102,12 +102,12 @@
            thread safe and in any case we're calling several methods. */
         VBoxSvcClipboardLock();
-        vboxClipboardChanged (pCtx);
+        vboxClipboardChanged(pCtx);
         VBoxSvcClipboardUnlock();
 
         /* Sleep for 200 msecs before next poll */
-        RTThreadUserWait (ThreadSelf, 200);
-    }
-
-    Log (("vboxClipboardThread: clipboard thread terminated successfully with return code %Rrc\n", VINF_SUCCESS));
+        RTThreadUserWait(ThreadSelf, 200);
+    }
+
+    Log(("vboxClipboardThread: clipboard thread terminated successfully with return code %Rrc\n", VINF_SUCCESS));
     return VINF_SUCCESS;
 }
@@ -118,19 +118,19 @@
 
 /** Initialise the host side of the shared clipboard - called by the hgcm layer. */
-int vboxClipboardInit (void)
-{
-    Log (("vboxClipboardInit\n"));
+int vboxClipboardInit(void)
+{
+    Log(("vboxClipboardInit\n"));
 
     g_ctx.fTerminate = false;
 
-    int rc = initPasteboard (&g_ctx.pasteboard);
-    AssertRCReturn (rc, rc);
-
-    rc = RTThreadCreate (&g_ctx.thread, vboxClipboardThread, &g_ctx, 0,
-                         RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "SHCLIP");
-    if (RT_FAILURE (rc))
+    int rc = initPasteboard(&g_ctx.pasteboard);
+    AssertRCReturn(rc, rc);
+
+    rc = RTThreadCreate(&g_ctx.thread, vboxClipboardThread, &g_ctx, 0,
+                        RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "SHCLIP");
+    if (RT_FAILURE(rc))
     {
         g_ctx.thread = NIL_RTTHREAD;
-        destroyPasteboard (&g_ctx.pasteboard);
+        destroyPasteboard(&g_ctx.pasteboard);
     }
 
@@ -139,21 +139,21 @@
 
 /** Terminate the host side of the shared clipboard - called by the hgcm layer. */
-void vboxClipboardDestroy (void)
-{
-    Log (("vboxClipboardDestroy\n"));
+void vboxClipboardDestroy(void)
+{
+    Log(("vboxClipboardDestroy\n"));
 
     /*
      * Signal the termination of the polling thread and wait for it to respond.
      */
-    ASMAtomicWriteBool (&g_ctx.fTerminate, true);
-    int rc = RTThreadUserSignal (g_ctx.thread);
-    AssertRC (rc);
-    rc = RTThreadWait (g_ctx.thread, RT_INDEFINITE_WAIT, NULL);
-    AssertRC (rc);
+    ASMAtomicWriteBool(&g_ctx.fTerminate, true);
+    int rc = RTThreadUserSignal(g_ctx.thread);
+    AssertRC(rc);
+    rc = RTThreadWait(g_ctx.thread, RT_INDEFINITE_WAIT, NULL);
+    AssertRC(rc);
 
     /*
      * Destroy the pasteboard and uninitialize the global context record.
      */
-    destroyPasteboard (&g_ctx.pasteboard);
+    destroyPasteboard(&g_ctx.pasteboard);
     g_ctx.thread = NIL_RTTHREAD;
     g_ctx.pClient = NULL;
@@ -167,5 +167,5 @@
  * @returns RT status code
  */
-int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
+int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
 {
     NOREF(fHeadless);
@@ -182,5 +182,5 @@
 
     /* Initially sync the host clipboard content with the client. */
-    int rc = vboxClipboardSync (pClient);
+    int rc = vboxClipboardSync(pClient);
 
     VBoxSvcClipboardUnlock();
@@ -192,9 +192,9 @@
  * after a save and restore of the guest.
  */
-int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient)
+int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA *pClient)
 {
     /* Sync the host clipboard content with the client. */
     VBoxSvcClipboardLock();
-    int rc = vboxClipboardChanged (pClient->pCtx);
+    int rc = vboxClipboardChanged(pClient->pCtx);
     VBoxSvcClipboardUnlock();
 
@@ -205,7 +205,7 @@
  * Shut down the shared clipboard subsystem and "disconnect" the guest.
  */
-void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient)
-{
-    Log (("vboxClipboardDisconnect\n"));
+void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
+{
+    Log(("vboxClipboardDisconnect\n"));
 
     VBoxSvcClipboardLock();
@@ -221,7 +221,7 @@
  * @param u32Formats Clipboard formats the guest is offering
  */
-void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
-{
-    Log (("vboxClipboardFormatAnnounce u32Formats %02X\n", u32Formats));
+void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
+{
+    Log(("vboxClipboardFormatAnnounce u32Formats %02X\n", u32Formats));
     if (u32Formats == 0)
     {
@@ -230,6 +230,5 @@
     }
 
-    vboxSvcClipboardReportMsg (pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,
-                               u32Formats);
+    vboxSvcClipboardReportMsg(pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, u32Formats);
 }
 
@@ -243,6 +242,6 @@
  * @param pcbActual Where to write the actual size of the written data
  */
-int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
-                           void *pv, uint32_t cb, uint32_t * pcbActual)
+int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
+                          void *pv, uint32_t cb, uint32_t *pcbActual)
 {
     VBoxSvcClipboardLock();
@@ -250,5 +249,5 @@
     /* Default to no data available. */
     *pcbActual = 0;
-    int rc = readFromPasteboard (pClient->pCtx->pasteboard, u32Format, pv, cb, pcbActual);
+    int rc = readFromPasteboard(pClient->pCtx->pasteboard, u32Format, pv, cb, pcbActual);
 
     VBoxSvcClipboardUnlock();
@@ -264,11 +263,10 @@
  * @param u32Format The format of the data written
  */
-void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv,
-                             uint32_t cb, uint32_t u32Format)
-{
-    VBoxSvcClipboardLock();
-
-    writeToPasteboard (pClient->pCtx->pasteboard, pv, cb, u32Format);
-
-    VBoxSvcClipboardUnlock();
-}
+void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
+{
+    VBoxSvcClipboardLock();
+
+    writeToPasteboard(pClient->pCtx->pasteboard, pv, cb, u32Format);
+
+    VBoxSvcClipboardUnlock();
+}
Index: /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp	(revision 78178)
+++ /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp	(revision 78179)
@@ -40,5 +40,5 @@
 
 /** Initialise the host side of the shared clipboard - called by the hgcm layer. */
-int vboxClipboardInit (void)
+int vboxClipboardInit(void)
 {
     LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
@@ -47,5 +47,5 @@
 
 /** Terminate the host side of the shared clipboard - called by the hgcm layer. */
-void vboxClipboardDestroy (void)
+void vboxClipboardDestroy(void)
 {
     LogFlowFunc(("called, returning.\n"));
@@ -59,6 +59,5 @@
   * @returns RT status code
   */
-int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient,
-                          bool fHeadless)
+int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
 {
     RT_NOREF(pClient, fHeadless);
@@ -71,5 +70,5 @@
  * after a save and restore of the guest.
  */
-int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA * /* pClient */)
+int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA * /* pClient */)
 {
     LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
@@ -82,5 +81,5 @@
  * @param   pClient    Structure containing context information about the guest system
  */
-void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient)
+void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
 {
     RT_NOREF(pClient);
@@ -95,6 +94,5 @@
  * @param u32Formats Clipboard formats the guest is offering
  */
-void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient,
-                                  uint32_t u32Formats)
+void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
 {
     RT_NOREF(pClient, u32Formats);
@@ -111,6 +109,6 @@
  * @param pcbActual Where to write the actual size of the written data
  */
-int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
-                           void *pv, uint32_t cb, uint32_t *pcbActual)
+int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
+                          void *pv, uint32_t cb, uint32_t *pcbActual)
 {
     RT_NOREF(pClient, u32Format, pv, cb);
@@ -129,6 +127,6 @@
  * @param u32Format The format of the data written
  */
-void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv,
-                             uint32_t cb, uint32_t u32Format)
+void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb,
+                            uint32_t u32Format)
 {
     RT_NOREF(pClient, pv, cb, u32Format);
@@ -136,2 +134,3 @@
 }
 
+
Index: /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp	(revision 78178)
+++ /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp	(revision 78179)
@@ -56,5 +56,4 @@
      * the backend is responsible for ensuring that this does not happen. */
     VBOXCLIPBOARDREQFROMVBOX *pReq;
-
     /** Pointer to the opaque X11 backend structure */
     CLIPBACKEND *pBackend;
@@ -74,6 +73,5 @@
  * @note  Host glue code
  */
-void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx,
-                                      uint32_t u32Formats)
+void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
 {
     LogRelFlowFunc(("called.  pCtx=%p, u32Formats=%02X\n", pCtx, u32Formats));
@@ -87,5 +85,5 @@
  * @note  Host glue code
  */
-int vboxClipboardInit (void)
+int vboxClipboardInit(void)
 {
     return VINF_SUCCESS;
@@ -96,5 +94,5 @@
  * @note  host glue code
  */
-void vboxClipboardDestroy (void)
+void vboxClipboardDestroy(void)
 {
 
@@ -107,5 +105,5 @@
  *        the clipboard and leave ownership to X11.
  */
-int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
+int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
 {
     int rc = VINF_SUCCESS;
@@ -113,6 +111,5 @@
 
     LogRel(("Starting host clipboard service\n"));
-    VBOXCLIPBOARDCONTEXT *pCtx =
-        (VBOXCLIPBOARDCONTEXT *) RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));
+    VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));
     if (!pCtx)
         rc = VERR_NO_MEMORY;
@@ -147,11 +144,11 @@
  * @note  Host glue code
  */
-int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient)
+int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA *pClient)
 {
     /* Tell the guest we have no data in case X11 is not available.  If
      * there is data in the host clipboard it will automatically be sent to
      * the guest when the clipboard starts up. */
-    vboxSvcClipboardReportMsg (pClient,
-                               VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, 0);
+    vboxSvcClipboardReportMsg(pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, 0);
+    /** @todo r=andy Check rc code. */
     return VINF_SUCCESS;
 }
@@ -161,5 +158,5 @@
  * @note  Host glue code
  */
-void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient)
+void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
 {
     LogRelFlow(("vboxClipboardDisconnect\n"));
@@ -192,10 +189,9 @@
  * @note  Host glue code
  */
-void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient,
-                                  uint32_t u32Formats)
-{
-    LogRelFlowFunc(("called.  pClient=%p, u32Formats=%02X\n", pClient,
-                 u32Formats));
-    ClipAnnounceFormatToX11 (pClient->pCtx->pBackend, u32Formats);
+void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
+{
+    LogRelFlowFunc(("called.  pClient=%p, u32Formats=%02X\n", pClient, u32Formats));
+
+    ClipAnnounceFormatToX11(pClient->pCtx->pBackend, u32Formats);
 }
 
@@ -229,13 +225,13 @@
  *
  */
-int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient,
-                           uint32_t u32Format, void *pv, uint32_t cb,
-                           uint32_t *pcbActual)
+int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient,
+                          uint32_t u32Format, void *pv, uint32_t cb,
+                          uint32_t *pcbActual)
 {
     LogRelFlowFunc(("pClient=%p, u32Format=%02X, pv=%p, cb=%u, pcbActual=%p",
-                 pClient, u32Format, pv, cb, pcbActual));
+                    pClient, u32Format, pv, cb, pcbActual));
 
     int rc = VINF_SUCCESS;
-    CLIPREADCBREQ *pReq = (CLIPREADCBREQ *) RTMemAlloc(sizeof(CLIPREADCBREQ));
+    CLIPREADCBREQ *pReq = (CLIPREADCBREQ *)RTMemAlloc(sizeof(CLIPREADCBREQ));
     if (!pReq)
         rc = VERR_NO_MEMORY;
@@ -270,5 +266,7 @@
     if (cb <= pReq->cb && cb != 0)
         memcpy(pReq->pv, pv, cb);
+
     RTMemFree(pReq);
+
     vboxSvcClipboardCompleteReadData(pCtx->pClient, rc, cb);
 }
@@ -293,5 +291,7 @@
 {
     int rc = VINF_SUCCESS;
+
     LogRelFlowFunc(("pCtx=%p, pReq=%p, u32Format=%02X\n", pCtx, pReq, u32Format));
+
     /* Request data from VBox */
     vboxSvcClipboardReportMsg(pCtx->pClient,
@@ -321,11 +321,10 @@
 /** Post a request for clipboard data to VBox/the guest and wait for it to be
  * completed. */
-static int clipRequestDataFromVBox(VBOXCLIPBOARDCONTEXT *pCtx,
-                                          VBOXCLIPBOARDREQFROMVBOX *pReq,
-                                          uint32_t u32Format)
+static int clipRequestDataFromVBox(VBOXCLIPBOARDCONTEXT *pCtx, VBOXCLIPBOARDREQFROMVBOX *pReq, uint32_t u32Format)
 {
     int rc = VINF_SUCCESS;
-    LogRelFlowFunc(("pCtx=%p, pReq=%p, u32Format=%02X\n", pCtx, pReq,
-                 u32Format));
+
+    LogRelFlowFunc(("pCtx=%p, pReq=%p, u32Format=%02X\n", pCtx, pReq, u32Format));
+
     /* Start by "posting" the request for the next invocation of
      * vboxClipboardWriteData. */
@@ -358,12 +357,10 @@
  * @note   Host glue code.
  */
-int ClipRequestDataForX11 (VBOXCLIPBOARDCONTEXT *pCtx,
-                                   uint32_t u32Format, void **ppv,
-                                   uint32_t *pcb)
+int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
 {
     VBOXCLIPBOARDREQFROMVBOX request = { NULL, 0, 0, NIL_RTSEMEVENT };
 
-    LogRelFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p, pcb=%p\n", pCtx,
-                 u32Format, ppv, pcb));
+    LogRelFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p, pcb=%p\n", pCtx, u32Format, ppv, pcb));
+
     if (pCtx->fShuttingDown)
     {
@@ -378,4 +375,5 @@
         RTSemEventDestroy(request.finished);
     }
+
     if (RT_SUCCESS(rc))
     {
@@ -383,7 +381,10 @@
         *pcb = request.cb;
     }
+
     LogRelFlowFunc(("returning %Rrc\n", rc));
+
     if (RT_SUCCESS(rc))
-        LogRelFlowFunc(("*ppv=%.*ls, *pcb=%u\n", *pcb / 2, *ppv, *pcb));
+        LogRelFlowFunc(("*ppv=%.*ls, *pcb=%u\n",*pcb / 2,*ppv,*pcb));
+
     return rc;
 }
@@ -398,14 +399,15 @@
  * @note   Host glue code
  */
-void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient,
-                             void *pv, uint32_t cb, uint32_t u32Format)
-{
-    LogRelFlowFunc (("called.  pClient=%p, pv=%p (%.*ls), cb=%u, u32Format=%02X\n",
-                  pClient, pv, cb / 2, pv, cb, u32Format));
+void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient,
+                            void *pv, uint32_t cb, uint32_t u32Format)
+{
+    LogRelFlowFunc(("called.  pClient=%p, pv=%p (%.*ls), cb=%u, u32Format=%02X\n",
+                    pClient, pv, cb / 2, pv, cb, u32Format));
 
     VBOXCLIPBOARDCONTEXT *pCtx = pClient->pCtx;
-    /* Grab the mutex and check whether there is a pending request for data.
-     */
+
+    /* Grab the mutex and check whether there is a pending request for data. */
     RTCritSectEnter(&pCtx->clipboardMutex);
+
     VBOXCLIPBOARDREQFROMVBOX *pReq = pCtx->pReq;
     if (pReq != NULL)
@@ -424,12 +426,13 @@
         pCtx->pReq = NULL;
     }
+
     RTCritSectLeave(&pCtx->clipboardMutex);
 }
 
 #ifdef TESTCASE
-#include <iprt/initterm.h>
-#include <iprt/stream.h>
-
-#define TEST_NAME "tstClipboardX11-2"
+# include <iprt/initterm.h>
+# include <iprt/stream.h>
+
+# define TEST_NAME "tstClipboardX11-2"
 
 struct _CLIPBACKEND
@@ -460,9 +463,10 @@
 };
 
-void vboxSvcClipboardReportMsg (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats)
-{
-    RT_NOREF1(u32Formats);
+void vboxSvcClipboardReportMsg(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats)
+{
+    RT_NOREF(u32Formats);
     CLIPBACKEND *pBackend = pClient->pCtx->pBackend;
-    if (   (u32Msg == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA)
+
+    if ((u32Msg == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA)
         && !pBackend->writeData.timeout)
         vboxClipboardWriteData(pClient, pBackend->writeData.pv,
@@ -480,7 +484,7 @@
 }
 
-CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool)
-{
-    RT_NOREF1(pFrontend);
+CLIPBACKEND* ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool)
+{
+    RT_NOREF(pFrontend);
     return (CLIPBACKEND *)RTMemAllocZ(sizeof(CLIPBACKEND));
 }
@@ -492,4 +496,10 @@
 
 int ClipStartX11(CLIPBACKEND *pBackend, bool)
+{
+    RT_NOREF(pBackend);
+    return VINF_SUCCESS;
+}
+
+int ClipStopX11(CLIPBACKEND *pBackend)
 {
     RT_NOREF1(pBackend);
@@ -497,12 +507,5 @@
 }
 
-int ClipStopX11(CLIPBACKEND *pBackend)
-{
-    RT_NOREF1(pBackend);
-    return VINF_SUCCESS;
-}
-
-void ClipAnnounceFormatToX11(CLIPBACKEND *pBackend,
-                                    uint32_t u32Formats)
+void ClipAnnounceFormatToX11(CLIPBACKEND *pBackend, uint32_t u32Formats)
 {
     pBackend->formats = u32Formats;
@@ -547,6 +550,5 @@
     else
     {
-        if (   pBackend->readData.format !=
-                       VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT
+        if (   pBackend->readData.format != VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT
             || pBackend->readData.pReq->pv != &u32Dummy
             || pBackend->readData.pReq->cb != 42
@@ -614,2 +616,3 @@
 }
 #endif  /* TESTCASE */
+
