VirtualBox

Changeset 26289 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Feb 5, 2010 2:04:05 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57358
Message:

Devices: warnings.

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/alsa_stubs.c

    r13510 r26289  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Stubs for libasound.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2010 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3333
    3434#define PROXY_STUB(function, rettype, signature, shortsig) \
    35 void (*function ## _fn)(void); \
    36 rettype function signature \
    37 { return ( (rettype (*) signature) function ## _fn ) shortsig; }
     35    static rettype (*pfn_ ## function) signature; \
     36    \
     37    rettype function signature \
     38    { \
     39        return pfn_ ## function shortsig; \
     40    }
    3841
    3942PROXY_STUB(snd_pcm_hw_params_any, int,
     
    115118} SHARED_FUNC;
    116119
    117 #define ELEMENT(s) { #s , & s ## _fn }
     120#define ELEMENT(function) { #function , (void (**)(void)) & pfn_ ## function }
    118121static SHARED_FUNC SharedFuncs[] =
    119122{
  • trunk/src/VBox/Devices/Audio/pulse_stubs.c

    r25678 r26289  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Stubs for libpulse.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2010 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3333
    3434#define PROXY_STUB(function, rettype, signature, shortsig) \
    35 void (*function ## _fn)(void); \
    36 rettype function signature \
    37 { return ( (rettype (*) signature) function ## _fn ) shortsig; }
     35    static rettype (*g_pfn_ ## function) signature; \
     36    \
     37    rettype function signature \
     38    { \
     39        return g_pfn_ ## function shortsig; \
     40    }
    3841
    3942#define PROXY_STUB_VOID(function, signature, shortsig) \
    40 void (*function ## _fn)(void); \
    41 void function signature \
    42 { ( (void (*) signature) function ## _fn ) shortsig; }
     43    static void (*g_pfn_ ## function) signature; \
     44    \
     45    void function signature \
     46    { \
     47        g_pfn_ ## function shortsig; \
     48    }
    4349
    4450#if PA_PROTOCOL_VERSION >= 16
     
    188194} SHARED_FUNC;
    189195
    190 #define ELEMENT(s) { #s , & s ## _fn }
     196#define ELEMENT(function) { #function , (void (**)(void)) & g_pfn_ ## function }
    191197static SHARED_FUNC SharedFuncs[] =
    192198{
     
    274280    return rc;
    275281}
     282
Note: See TracChangeset for help on using the changeset viewer.

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