Module: wine Branch: master Commit: 834f7b23667e169a0a20ba732b88d8e29f6cf668 URL: https://gitlab.winehq.org/wine/wine/-/commit/834f7b23667e169a0a20ba732b88d8e...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jun 12 13:20:18 2023 +0200
winegcc: Fix an uninitialized variable warning in the PE build.
---
tools/winegcc/winegcc.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index c0f881df0a2..b6a6c42068d 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -305,24 +305,18 @@ static struct strarray build_tool_name( struct options *opts, enum tool tool )
static struct strarray get_translator(struct options *opts) { - enum tool tool; - switch(opts->processor) { case proc_cpp: - tool = TOOL_CPP; - break; + return build_tool_name( opts, TOOL_CPP ); case proc_cc: case proc_as: - tool = TOOL_CC; - break; + return build_tool_name( opts, TOOL_CC ); case proc_cxx: - tool = TOOL_CXX; - break; - default: - assert(0); + return build_tool_name( opts, TOOL_CXX ); } - return build_tool_name( opts, tool ); + assert(0); + return empty_strarray; }
static int try_link( struct strarray prefix, struct strarray link_tool, const char *cflags )