[PATCH] winmm: Don't mask out SND_ALIAS_ID or SND_FILENAME in sndPlaySound
Dmitry Timoshkov
dmitry at baikal.ru
Wed Dec 5 09:21:39 CST 2012
Andrew Eikum <aeikum at codeweavers.com> wrote:
> > > > > + br = sndPlaySoundA((LPCSTR)SND_ALIAS_SYSTEMASTERISK, SND_ALIAS_ID|SND_SYNC);
> > > > > + ok(br == TRUE || br == FALSE, "sndPlaySound gave strange return: %u\n", br);
> > > >
> > > > This kind of test is broken.
> > > >
> > >
> > > Care to elaborate? Being this terse helps no one.
> >
> > What is this code testing the return value for? Why are there all these casts?
> >
>
> The call is only supposed to return TRUE or FALSE, so I guess it's
> checking that the return value isn't 3 or something. Not very useful,
> sure, but it looked odd to just have a series of sndPlaySound calls in
> a row without ok() calls. The real test is to make sure sndPlaySound
> doesn't crash, as it does without my patch.
Then the test is completely useless, it actually tests nothing.
--
Dmitry.
More information about the wine-devel
mailing list