Bad usage of ok() macro in tests

Yann Droneaud yann at
Wed Feb 24 09:25:50 CST 2010

Le mercredi 24 février 2010 à 15:47 +0100, Yann Droneaud a écrit :
> Hi,
> While trying to manage to fix warning about unused values, I've found a
> problem about some usages of ok() macro.
> ok() macros is defined in include/wine/test.h as:
>    #define ok_(file, line)       (winetest_set_location(file, line),
> 0) ? 0 : winetest_ok
>    #define ok       ok_(__FILE__, __LINE__)

> Hopefully, this is only of limited use in wine test suite: find . -type
> d -name tests | xargs grep -r '[=\!][[:space:](]*ok[[:space:]]*('
> returns only four cases:

In fact, it seems there's no more than those construct which use ok()
return value.

Try :

find . -type d -and -name 'tests' | xargs grep -nr
find . -type d -and -name 'tests' | xargs grep -r '[=\!]\

So I think it's a good opportunity to simplify ok() and let's it return

#define ok       winetest_set_location(__FILE__, __LINE__), winetest_ok


Yann Droneaud

More information about the wine-devel mailing list