crossfade: emulate strtok_r() on WIN32 with a function

Not a CPP macro.  This adds the "unused" attribute to "saveptr", which
eliminates one gcc warning.
This commit is contained in:
Max Kellermann 2010-05-18 23:55:48 +02:00
parent 0a9b0dd070
commit bedc172eab

View File

@ -33,7 +33,11 @@
#define G_LOG_DOMAIN "crossfade" #define G_LOG_DOMAIN "crossfade"
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#define strtok_r(s,d,p) strtok(s,d) static char *
strtok_r(char *str, const char *delim, G_GNUC_UNUSED char **saveptr)
{
return strtok(str, delim);
}
#endif #endif
static float mixramp_interpolate(char *ramp_list, float required_db) static float mixramp_interpolate(char *ramp_list, float required_db)