VirtualBox

Changeset 63298 in vbox for trunk/src/VBox/Frontends/VBoxSDL


Ignore:
Timestamp:
Aug 10, 2016 4:35:00 PM (8 years ago)
Author:
vboxsync
Message:

VBoxSDL: warnings

Location:
trunk/src/VBox/Frontends/VBoxSDL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r60759 r63298  
    11/* $Id$ */
    22/** @file
    3  *
    4  * VBox frontends: VBoxSDL (simple frontend based on SDL):
    5  * Implementation of VBoxSDLFB (SDL framebuffer) class
     3 * VBoxSDL - Implementation of VBoxSDLFB (SDL framebuffer) class
    64 */
    75
     
    4543
    4644#if defined(RT_OS_WINDOWS) || defined(RT_OS_LINUX)
    47 #include <SDL_syswm.h>           /* for SDL_GetWMInfo() */
     45# ifdef _MSC_VER
     46#  pragma warning(push)
     47#  pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/
     48# endif
     49# include <SDL_syswm.h>           /* for SDL_GetWMInfo() */
     50# ifdef _MSC_VER
     51#  pragma warning(pop)
     52# endif
    4853#endif
    4954
     
    153158#ifdef RT_OS_WINDOWS
    154159    HRESULT hr = CoCreateFreeThreadedMarshaler(this, m_pUnkMarshaler.asOutParam());
    155     Log(("CoCreateFreeThreadedMarshaler hr %08X\n", hr));
     160    Log(("CoCreateFreeThreadedMarshaler hr %08X\n", hr)); NOREF(hr);
    156161#endif
    157162
     
    561566STDMETHODIMP VBoxSDLFB::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, BOOL *supported)
    562567{
     568    RT_NOREF(bpp);
     569
    563570    if (!supported)
    564571        return E_POINTER;
     
    616623STDMETHODIMP VBoxSDLFB::ProcessVHWACommand(BYTE *pCommand)
    617624{
     625    RT_NOREF(pCommand);
    618626    return E_NOTIMPL;
    619627}
     
    621629STDMETHODIMP VBoxSDLFB::Notify3DEvent(ULONG uType, ComSafeArrayIn(BYTE, aData))
    622630{
     631    RT_NOREF(uType, aData);
    623632    return E_NOTIMPL;
    624633}
     
    917926    SDL_VERSION(&info.version);
    918927    if (SDL_GetWMInfo(&info))
    919         mWinId = (LONG64) info.window;
     928        mWinId = (intptr_t) info.window;
    920929# elif defined (RT_OS_LINUX)
    921930    SDL_SysWMinfo info;
     
    11511160
    11521161#ifdef VBOX_SECURELABEL
     1162
    11531163/**
    11541164 * Setup the secure labeling parameters
     
    12131223void VBoxSDLFB::paintSecureLabel(int x, int y, int w, int h, bool fForce)
    12141224{
    1215 #ifdef VBOXSDL_WITH_X11
     1225    RT_NOREF(x, w, h);
     1226# ifdef VBOXSDL_WITH_X11
    12161227    AssertMsg(gSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n"));
    1217 #endif
     1228# endif
    12181229    /* only when the function is present */
    12191230    if (!pTTF_RenderUTF8_Solid)
     
    12501261    SDL_UpdateRect(mScreen, 0, 0, mScreen->w, mLabelHeight);
    12511262}
     1263
    12521264#endif /* VBOX_SECURELABEL */
    12531265
     
    14111423STDMETHODIMP VBoxSDLFBOverlay::COMGETTER(Alpha)(ULONG *alpha)
    14121424{
     1425    RT_NOREF(alpha);
    14131426    LogFlow(("VBoxSDLFBOverlay::GetAlpha\n"));
    14141427    return E_NOTIMPL;
     
    14231436STDMETHODIMP VBoxSDLFBOverlay::COMSETTER(Alpha)(ULONG alpha)
    14241437{
     1438    RT_NOREF(alpha);
    14251439    LogFlow(("VBoxSDLFBOverlay::SetAlpha\n"));
    14261440    return E_NOTIMPL;
     
    15941608                                             ULONG w, ULONG h, BOOL *finished)
    15951609{
     1610    RT_NOREF(aScreenId, bytesPerLine, finished);
    15961611    AssertReturn(pixelFormat == BitmapFormat_BGR, E_INVALIDARG);
    15971612    AssertReturn(vram == 0, E_INVALIDARG);
     
    16231638 * Basically, we support anything with 32bpp.
    16241639 */
    1625 STDMETHODIMP VBoxSDLFBOverlay::VideoModeSupported(ULONG width, ULONG height, ULONG bpp,
    1626                                                BOOL *supported)
    1627 {
     1640STDMETHODIMP VBoxSDLFBOverlay::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, BOOL *supported)
     1641{
     1642    RT_NOREF(width, height);
    16281643    if (!supported)
    16291644        return E_POINTER;
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r60865 r63298  
    4646#endif
    4747
     48#ifdef _MSC_VER
     49# pragma warning(push)
     50# pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/
     51#endif
    4852#ifndef RT_OS_DARWIN
    49 #include <SDL_syswm.h>           /* for SDL_GetWMInfo() */
     53# include <SDL_syswm.h>          /* for SDL_GetWMInfo() */
     54#endif
     55#ifdef _MSC_VER
     56# pragma warning(pop)
    5057#endif
    5158
     
    321328    STDMETHOD(HandleEvent)(VBoxEventType_T aType, IEvent * aEvent)
    322329    {
     330        RT_NOREF(aEvent);
    323331        switch (aType)
    324332        {
     
    552560                if (SDL_GetWMInfo(&info))
    553561                {
    554 #if defined(VBOXSDL_WITH_X11)
     562# if defined(VBOXSDL_WITH_X11)
    555563                    pSWEv->COMSETTER(WinId)((LONG64)info.info.x11.wmwindow);
    556 #elif defined(RT_OS_WINDOWS)
    557                     pSWEv->COMSETTER(WinId)((LONG64)info.window);
    558 #else
     564# elif defined(RT_OS_WINDOWS)
     565                    pSWEv->COMSETTER(WinId)((intptr_t)info.window);
     566# else
    559567                    AssertFailed();
    560 #endif
     568# endif
    561569                }
    562570#endif /* !RT_OS_DARWIN */
     
    741749DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    742750{
     751    RT_NOREF(envp);
    743752#ifdef RT_OS_WINDOWS
    744753    ATL::CComModule _Module; /* Required internally by ATL (constructor records instance in global variable). */
     
    36693678        if (!keycode)
    36703679        {
    3671 #ifdef DEBUG_bird
     3680# ifdef DEBUG_bird
    36723681            RTPrintf("Untranslated: keycode=%#x (%d)\n", keycode, keycode);
    3673 #endif
     3682# endif
    36743683            keycode = Keyevent2KeycodeFallback(ev);
    36753684        }
    36763685    }
    3677 #ifdef DEBUG_bird
     3686# ifdef DEBUG_bird
    36783687    RTPrintf("scancode=%#x -> %#x\n", ev->keysym.scancode, keycode);
    3679 #endif
    3680 
    3681 #elif RT_OS_OS2
     3688# endif
     3689
     3690#elif defined(RT_OS_OS2)
    36823691    keycode = Keyevent2KeycodeFallback(ev);
    36833692#endif /* RT_OS_DARWIN */
     
    50395048static Uint32 StartupTimer(Uint32 interval, void *param)
    50405049{
     5050    RT_NOREF(param);
     5051
    50415052    /* post message so we can do something in the startup loop */
    50425053    SDL_Event event = {0};
     
    50535064static Uint32 ResizeTimer(Uint32 interval, void *param)
    50545065{
     5066    RT_NOREF(interval, param);
     5067
    50555068    /* post message so the window is actually resized */
    50565069    SDL_Event event = {0};
     
    50675080static Uint32 QuitTimer(Uint32 interval, void *param)
    50685081{
     5082    RT_NOREF(interval, param);
     5083
    50695084    BOOL fHandled = FALSE;
    50705085
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.h

    r62493 r63298  
    2424#ifdef RT_OS_WINDOWS /** @todo check why we need to do this on windows. */
    2525/* convince SDL to not overload main() */
    26 #define _SDL_main_h
     26# define _SDL_main_h
    2727#endif
     28
    2829/* include this first so Windows.h get's in before our stuff. */
     30#ifdef _MSC_VER
     31# pragma warning(push)
     32# pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/
     33#endif
    2934#include <SDL.h>
     35#ifdef _MSC_VER
     36# pragma warning(pop)
     37#endif
    3038
    3139/** custom SDL event for display update handling */
Note: See TracChangeset for help on using the changeset viewer.

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