On Wed, Feb 24, 2010 at 9:25 AM, Yann Droneaud yann@droneaud.fr wrote:
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 'if[[:space:]]*([[:space:]]*!?[[:space:](]*ok[[:space:]]*(' find . -type d -and -name 'tests' | xargs grep -r '[=!]\ +[[:space:](]*ok[[:space:]]*('
So I think it's a good opportunity to simplify ok() and let's it return void:
#define ok winetest_set_location(__FILE__, __LINE__), winetest_ok
Nice catch! Seems Alexandre fixed these issues: http://source.winehq.org/git/wine.git/?a=commitdiff;h=69ee0ad151b4ae14fa017d... http://source.winehq.org/git/wine.git/?a=commitdiff;h=fbbac38e4ed9fd95d5ab3d... http://source.winehq.org/git/wine.git/?a=commitdiff;h=2432b0f6b91e57e886dfe3... http://source.winehq.org/git/wine.git/?a=commitdiff;h=d5a54642f478a530cf7672... http://source.winehq.org/git/wine.git/?a=commitdiff;h=d279227538a32130c437ba...