VirtualBox

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


Ignore:
Timestamp:
Sep 5, 2007 7:39:34 AM (17 years ago)
Author:
vboxsync
Message:

Fixes for taking the address of a va_list parameter. (must make stack copy using va_copy or GCC/AMD64 won't work right.)

File:
1 edited

Legend:

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

    r3670 r4521  
    337337}
    338338
    339 void AUD_vlog (const char *cap, const char *fmt, va_list ap)
    340 {
     339void AUD_vlog (const char *cap, const char *fmt, va_list va)
     340{
     341    va_list va2;
     342    va_copy (va2, va); /* Have to make a copy here or GCC will break. */
    341343    if (cap) {
    342         Log (("%s: %N", cap, fmt, &ap));
     344        Log (("%s: %N", cap, fmt, &va2));
    343345    }
    344346    else {
    345         Log (("%N", fmt, &ap));
    346     }
     347        Log (("%N", fmt, &va2));
     348    }
     349    va_end (va2);
    347350}
    348351
    349352void AUD_log (const char *cap, const char *fmt, ...)
    350353{
    351     va_list ap;
    352 
    353     va_start (ap, fmt);
    354     AUD_vlog (cap, fmt, ap);
    355     va_end (ap);
     354    va_list va;
     355
     356    va_start (va, fmt);
     357    AUD_vlog (cap, fmt, va);
     358    va_end (va);
    356359}
    357360
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