VirtualBox

vbox的更動 62883 路徑 trunk/src/VBox/Additions


忽略:
時間撮記:
2016-8-2 下午03:51:18 (8 年 以前)
作者:
vboxsync
訊息:

Additions/*: gcc warnings.

位置:
trunk/src/VBox/Additions/x11/VBoxClient
檔案:
修改 9 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h

    r62530 r62883  
    5858
    5959/** Default handler for various struct VBCLSERVICE member functions. */
    60 static int VBClServiceDefaultHandler(struct VBCLSERVICE **pSelf)
     60DECLINLINE(int) VBClServiceDefaultHandler(struct VBCLSERVICE **pSelf)
    6161{
     62    RT_NOREF1(pSelf);
    6263    return VINF_SUCCESS;
    6364}
     
    6667 * Usually used because the service is cleaned up automatically when the user
    6768 * process/X11 exits. */
    68 static void VBClServiceDefaultCleanup(struct VBCLSERVICE **ppInterface)
     69DECLINLINE(void) VBClServiceDefaultCleanup(struct VBCLSERVICE **ppInterface)
    6970{
    7071    NOREF(ppInterface);
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r62530 r62883  
    8585 *                    returned
    8686 */
    87 int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format,
    88                           void **ppv, uint32_t *pcb)
    89 {
     87int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
     88{
     89    RT_NOREF1(pCtx);
    9090    int rc = VINF_SUCCESS;
    9191    uint32_t cb = 1024;
     
    148148void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
    149149{
    150     int rc;
     150    RT_NOREF1(pCtx);
    151151    LogRelFlowFunc(("u32Formats=%d\n", u32Formats));
    152     rc = VbglR3ClipboardReportFormats(g_ctx.client, u32Formats);
     152    int rc = VbglR3ClipboardReportFormats(g_ctx.client, u32Formats);
    153153    LogRelFlowFunc(("rc=%Rrc\n", rc));
    154154}
     
    164164 * @param  cb        the size of the data in @a pv
    165165 */
    166 void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
    167                                     CLIPREADCBREQ *pReq, void *pv,
    168                                     uint32_t cb)
    169 {
     166void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     167{
     168    RT_NOREF1(pCtx);
    170169    if (RT_SUCCESS(rc))
    171170        vboxClipboardSendData(pReq->u32Format, pv, cb);
     
    287286static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
    288287{
    289     int rc;
    290 
    291     NOREF(ppInterface);
     288    RT_NOREF2(ppInterface, fDaemonised);
     289
    292290    /* Initialise the guest library. */
    293     rc = VbglR3InitUser();
     291    int rc = VbglR3InitUser();
    294292    if (RT_FAILURE(rc))
    295293        VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
  • trunk/src/VBox/Additions/x11/VBoxClient/display.cpp

    r62530 r62883  
    103103            RTStrPrintf(szCommand, sizeof(szCommand), "%s -s %ux%u",
    104104                        pState->pcszXrandr, ((unsigned long *)pData)[0] >> 16, ((unsigned long *)pData)[0] & 0xFFFF);
    105             system(szCommand);
     105            int rcShutUpGcc = system(szCommand); RT_NOREF_PV(rcShutUpGcc);
    106106            XFree(pData);
    107107        }
     
    128128        char szCommand[sizeof(szCommandBase) + 256];
    129129        RTStrPrintf(szCommand, sizeof(szCommand), szCommandBase, pState->pcszXrandr);
    130         system(szCommand);
     130        int rcShutUpGcc = system(szCommand); RT_NOREF_PV(rcShutUpGcc);
    131131    }
    132132}
     
    252252static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
    253253{
     254    RT_NOREF1(fDaemonised);
    254255    struct DISPLAYSTATE *pSelf = getStateFromInterface(ppInterface);
    255     int rc;
    256256
    257257    if (!pSelf->mfInit)
  • trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp

    r61656 r62883  
    921921            {
    922922                bool fAcceptDrop     = ASMBitTest   (&e.xclient.data.l[XdndStatusFlags], 0); /* Does the target accept the drop? */
     923                RTCString strActions = xAtomToString( e.xclient.data.l[XdndStatusAction]);
     924#ifdef LOG_ENABLED
    923925                bool fWantsPosition  = ASMBitTest   (&e.xclient.data.l[XdndStatusFlags], 1); /* Does the target want XdndPosition messages? */
    924                 RTCString strActions = xAtomToString( e.xclient.data.l[XdndStatusAction]);
    925 
    926926                char *pszWndName = wndX11GetNameA(e.xclient.data.l[XdndStatusWindow]);
    927927                AssertPtr(pszWndName);
     
    937937                RTStrFree(pszWndName);
    938938
    939                 uint16_t x = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
    940                 uint16_t y = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
    941                 uint16_t w = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
    942                 uint16_t h = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
    943                 LogFlowThisFunc(("\tReported dead area: x=%RU16, y=%RU16, w=%RU16, h=%RU16\n", x, y, w, h));
     939                uint16_t x  = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
     940                uint16_t y  = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
     941                uint16_t cx = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
     942                uint16_t cy = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
     943                LogFlowThisFunc(("\tReported dead area: x=%RU16, y=%RU16, cx=%RU16, cy=%RU16\n", x, y, cx, cy));
     944#endif
    944945
    945946                uint32_t uAction = DND_IGNORE_ACTION; /* Default is ignoring. */
     
    952953            else if (e.xclient.message_type == xAtom(XA_XdndFinished))
    953954            {
     955#ifdef LOG_ENABLED
    954956                bool fSucceeded = ASMBitTest(&e.xclient.data.l[XdndFinishedFlags], 0);
    955957
     
    963965
    964966                RTStrFree(pszWndName);
     967#endif
    965968
    966969                reset();
     
    10721075                    break;
    10731076                }
    1074 
    1075                 int32_t lPos      = e.xclient.data.l[XdndPositionXY];
     1077#ifdef LOG_ENABLED
     1078                int32_t iPos      = e.xclient.data.l[XdndPositionXY];
    10761079                Atom    atmAction = m_curVer >= 2 /* Actions other than "copy" or only supported since protocol version 2. */
    10771080                                  ? e.xclient.data.l[XdndPositionAction] : xAtom(XA_XdndActionCopy);
    1078 
    10791081                LogFlowThisFunc(("XA_XdndPosition: wndProxy=%#x, wndCur=%#x, x=%RI32, y=%RI32, strAction=%s\n",
    1080                                  m_wndProxy.hWnd, m_wndCur, RT_HIWORD(lPos), RT_LOWORD(lPos),
     1082                                 m_wndProxy.hWnd, m_wndCur, RT_HIWORD(iPos), RT_LOWORD(iPos),
    10811083                                 xAtomToString(atmAction).c_str()));
     1084#endif
    10821085
    10831086                bool fAcceptDrop = true;
     
    11661169int DragInstance::onX11MotionNotify(const XEvent &e)
    11671170{
     1171    RT_NOREF1(e);
    11681172    LogFlowThisFunc(("mode=%RU32, state=%RU32\n", m_enmMode, m_enmState));
    11691173
     
    11821186int DragInstance::onX11SelectionClear(const XEvent &e)
    11831187{
     1188    RT_NOREF1(e);
    11841189    LogFlowThisFunc(("mode=%RU32, state=%RU32\n", m_enmMode, m_enmState));
    11851190
     
    13321337                                 pReq->requestor,
    13331338                                 gX11->xErrorToString(xRc).c_str()));
     1339                    NOREF(xRc);
    13341340                }
    13351341            }
     
    18551861int DragInstance::hgDrop(uint32_t u32xPos, uint32_t u32yPos, uint32_t uDefaultAction)
    18561862{
     1863
     1864
     1865    /** @todo r=bird: Please, stop using 'u32' as a prefix unless you've got a _real_ _important_ reason for needing the bit count. */
     1866
     1867
     1868    RT_NOREF3(u32xPos, u32yPos, uDefaultAction);
    18571869    LogFlowThisFunc(("wndCur=%#x, wndProxy=%#x, mode=%RU32, state=%RU32\n", m_wndCur, m_wndProxy.hWnd, m_enmMode, m_enmState));
    18581870    LogFlowThisFunc(("u32xPos=%RU32, u32yPos=%RU32, uAction=%RU32\n", u32xPos, u32yPos, uDefaultAction));
     
    22952307    {
    22962308        int rc2 = VbglR3DnDGHSendError(&m_dndCtx, rc);
    2297         LogFlowThisFunc(("Sending error to host resulted in %Rrc\n", rc2));
     2309        LogFlowThisFunc(("Sending error to host resulted in %Rrc\n", rc2)); NOREF(rc2);
    22982310        /* This is not fatal for us, just ignore. */
    22992311    }
     
    25062518
    25072519    LogFlowThisFunc(("fInRootWnd=%RTbool, wndRoot=0x%x, wndChild=0x%x, iRootX=%d, iRootY=%d\n",
    2508                      RT_BOOL(fInRootWnd), wndRoot, wndChild, iRootX, iRootY));
     2520                     RT_BOOL(fInRootWnd), wndRoot, wndChild, iRootX, iRootY)); NOREF(fInRootWnd);
    25092521
    25102522    if (piRootX)
     
    27652777int DragInstance::toAtomList(const void *pvData, uint32_t cbData, VBoxDnDAtomList &lstAtoms) const
    27662778{
     2779    RT_NOREF1(lstAtoms);
    27672780    AssertPtrReturn(pvData, VERR_INVALID_POINTER);
    27682781    AssertReturn(cbData, VERR_INVALID_PARAMETER);
     
    30303043int DragAndDropService::run(bool fDaemonised /* = false */)
    30313044{
     3045    RT_NOREF1(fDaemonised);
    30323046    LogFlowThisFunc(("fDaemonised=%RTbool\n", fDaemonised));
    30333047
  • trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp

    r62530 r62883  
    7676        DBusMessageIter iter;
    7777        DBusMessageIter array;
    78         DBusMessageIter dict;
    79         DBusMessageIter value;
    80         DBusMessageIter variant;
    81         DBusMessageIter data;
     78        /*DBusMessageIter dict; - unused */
     79        /*DBusMessageIter value; - unused */
     80        /*DBusMessageIter variant; - unused */
     81        /*DBusMessageIter data; - unused */
    8282
    8383        /* Format: UINT32 org.freedesktop.Notifications.Notify
     
    101101
    102102        DBusMessage *reply;
    103         reply = dbus_connection_send_with_reply_and_block(conn, msg,
    104             30 * 1000 /* 30 seconds timeout */, &err);
     103        reply = dbus_connection_send_with_reply_and_block(conn, msg, 30 * 1000 /* 30 seconds timeout */, &err);
    105104        if (dbus_error_is_set(&err))
    106         {
    107105            LogRel(("D-BUS returned an error while sending the notification: %s", err.message));
    108         }
    109106        else if (reply)
    110107        {
  • trunk/src/VBox/Additions/x11/VBoxClient/main.cpp

    r62530 r62883  
    4646#include "VBoxClient.h"
    4747
    48 static int (*gpfnOldIOErrorHandler)(Display *) = NULL;
     48/*static int (*gpfnOldIOErrorHandler)(Display *) = NULL; - unused */
    4949
    5050/** Object representing the service we are running.  This has to be global
     
    7373        pszCommand = RTStrAPrintf2("notify-send \"VBoxClient: %s\"", pszMessage);
    7474        if (pszCommand)
    75             system(pszCommand);
     75        {
     76            int rcShutUpGcc = system(pszCommand); RT_NOREF_PV(rcShutUpGcc);
     77        }
    7678    }
    7779    _exit(1);
     
    124126static int vboxClientXLibIOErrorHandler(Display *pDisplay)
    125127{
     128    RT_NOREF1(pDisplay);
    126129    LogRel(("VBoxClient: a fatal guest X Window error occurred.  This may just mean that the Window system was shut down while the client was still running.\n"));
    127130    VBClCleanUp();
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp

    r62530 r62883  
    477477{
    478478    LogRelFlowFunc(("\n"));
    479     unsigned cRects = 0;
    480479    struct RectList rects = RTVEC_INITIALIZER;
    481480
    482     if (0 != mcRects)
     481    if (mcRects != 0)
    483482    {
    484483        int rc = RectListReserve(&rects, mcRects * 2);
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp

    r62530 r62883  
    191191 * The actual X11 window configuration change monitor thread function.
    192192 */
    193 int SeamlessMain::x11MonitorThread(RTTHREAD self, void *pvUser)
    194 {
     193int SeamlessMain::x11MonitorThread(RTTHREAD hThreadSelf, void *pvUser)
     194{
     195    RT_NOREF1(hThreadSelf);
    195196    SeamlessMain *pHost = (SeamlessMain *)pvUser;
    196197    int rc = VINF_SUCCESS;
     
    333334static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
    334335{
     336    RT_NOREF1(fDaemonised);
    335337    struct SEAMLESSSERVICE *pSelf = getClassFromInterface(ppInterface);
    336338    int rc;
  • trunk/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11-auto.cpp

    r62530 r62883  
    5555Display *XOpenDisplay(const char *display_name)
    5656{
     57    RT_NOREF1(display_name);
    5758    return TEST_DISPLAY;
    5859}
     
    6162int XCloseDisplay(Display *display)
    6263{
     64    RT_NOREF1(display);
    6365    Assert(display == TEST_DISPLAY);
    6466    return 0;
     
    7173};
    7274
    73 extern "C" Atom XInternAtom(Display *display, const char *atom_name,
    74                             Bool only_if_exists);
    75 Atom XInternAtom(Display *display, const char *atom_name, Bool only_if_exists)
    76 {
     75extern "C" Atom XInternAtom(Display *display, const char *atom_name, Bool only_if_exists);
     76Atom            XInternAtom(Display *display, const char *atom_name, Bool only_if_exists)
     77{
     78    RT_NOREF2(only_if_exists, display);
    7779    Assert(display == TEST_DISPLAY);
    7880    if (!RTStrCmp(atom_name, WM_TYPE_PROP))
     
    9698                                  unsigned long *bytes_after_return,
    9799                                  unsigned char **prop_return);
    98 int XGetWindowProperty(Display *display, Window w, Atom property,
    99                        long long_offset, long long_length, Bool delProp,
    100                        Atom req_type, Atom *actual_type_return,
    101                        int *actual_format_return,
    102                        unsigned long *nitems_return,
    103                        unsigned long *bytes_after_return,
    104                        unsigned char **prop_return)
    105 {
     100int            XGetWindowProperty(Display *display, Window w, Atom property,
     101                                  long long_offset, long long_length, Bool delProp,
     102                                  Atom req_type, Atom *actual_type_return,
     103                                  int *actual_format_return,
     104                                  unsigned long *nitems_return,
     105                                  unsigned long *bytes_after_return,
     106                                  unsigned char **prop_return)
     107{
     108    RT_NOREF2(display, long_length);
    106109    Assert(display == TEST_DISPLAY);
    107110    Atom atomType = XInternAtom (display, WM_TYPE_PROP, true);
     
    130133}
    131134
     135#if 0 /* unused */
    132136/** Sets the current set of properties for all mock X11 windows */
    133137static void smlsSetDesktopWindow(Window hWin)
     
    135139    g_hSmlsDesktopWindow = hWin;
    136140}
    137 
    138 extern "C" Bool XShapeQueryExtension (Display *dpy, int *event_basep,
    139                                       int *error_basep);
    140 Bool XShapeQueryExtension (Display *dpy, int *event_basep, int *error_basep)
    141 {
     141#endif
     142
     143extern "C" Bool XShapeQueryExtension(Display *dpy, int *event_basep, int *error_basep);
     144Bool            XShapeQueryExtension(Display *dpy, int *event_basep, int *error_basep)
     145{
     146    RT_NOREF3(dpy, event_basep, error_basep);
    142147    Assert(dpy == TEST_DISPLAY);
    143148    return true;
     
    146151/* We silently ignore this for now. */
    147152extern "C" int XSelectInput(Display *display, Window w, long event_mask);
    148 int XSelectInput(Display *display, Window w, long event_mask)
    149 {
     153int            XSelectInput(Display *display, Window w, long event_mask)
     154{
     155    RT_NOREF3(display,  w,  event_mask);
    150156    Assert(display == TEST_DISPLAY);
    151157    return 0;
     
    153159
    154160/* We silently ignore this for now. */
    155 extern "C" void XShapeSelectInput(Display *display, Window w,
    156                                   unsigned long event_mask);
    157 void XShapeSelectInput(Display *display, Window w, unsigned long event_mask)
    158 {
     161extern "C" void XShapeSelectInput(Display *display, Window w, unsigned long event_mask);
     162void            XShapeSelectInput(Display *display, Window w, unsigned long event_mask)
     163{
     164    RT_NOREF3(display, w, event_mask);
    159165    Assert(display == TEST_DISPLAY);
    160166}
     
    163169Window XDefaultRootWindow(Display *display)
    164170{
     171    RT_NOREF1(display);
    165172    Assert(display == TEST_DISPLAY);
    166173    return TEST_ROOT;
     
    179186                  unsigned int *nchildren_return)
    180187{
     188    RT_NOREF1(display);
    181189    Assert(display == TEST_DISPLAY);
    182190    AssertReturn(w == TEST_ROOT, False);  /* We support nothing else */
     
    197205Window XmuClientWindow(Display *dpy, Window win)
    198206{
     207    RT_NOREF1(dpy);
    199208    Assert(dpy == TEST_DISPLAY);
    200209    return win;
     
    206215                            XWindowAttributes *window_attributes_return)
    207216{
     217    RT_NOREF1(display);
    208218    Assert(display == TEST_DISPLAY);
    209219    AssertPtrReturn(window_attributes_return, 1);
     
    224234                         XSizeHints *hints_return, long *supplied_return)
    225235{
     236    RT_NOREF4(display, w, hints_return, supplied_return);
    226237    Assert(display == TEST_DISPLAY);
    227238    return 1;
     
    248259                                 int *count, int *ordering)
    249260{
     261    RT_NOREF2(dpy, kind);
    250262    Assert(dpy == TEST_DISPLAY);
    251263    if ((window != g_SmlsShapedWindow) || (window == 0))
     
    273285int XNextEvent(Display *display, XEvent *event_return)
    274286{
     287    RT_NOREF1(display);
    275288    Assert(display == TEST_DISPLAY);
    276289    event_return->xany.type = g_SmlsEventType;
     
    292305                  long event_mask, XEvent *event_send)
    293306{
     307    RT_NOREF5(display, w, propagate, event_mask, event_send);
    294308    Assert(display == TEST_DISPLAY);
    295309    AssertFailedReturn(0);
     
    300314int XFlush(Display *display)
    301315{
     316    RT_NOREF1(display);
    302317    Assert(display == TEST_DISPLAY);
    303318    AssertFailedReturn(0);
     
    310325static void sendRegionUpdate(RTRECT *pRects, size_t cRects)
    311326{
     327    RT_NOREF2(pRects, cRects);
    312328    g_fNotified = true;
    313329}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette