The "deadness" of the assignment isn't because it won't change the value of ximStyleCallback, but because nothing reads from ximStyleCallback after that point. This looks like it needs additional review as to what the purpose of ximStyleCallback is in the first place. Its value does change the potential code path in the preceding for loop, but that doesn't seem especially meaningful. So, what is its purpose?
-Ken
On Feb 1, 2017, at 8:20 AM, Aric Stewart aric@codeweavers.com wrote:
Are you sure that is dead? clang must be saying so but the assignment of ximStyleCallback to ximStyle seems meaningful. Just above this code we have code that ensures that ximStyle is not 0, so if ximStyleCallback == 0 then assigning ximStyleCallback = ximStyle does not seem dead to me.
-aric
From: André Hentschel nerv@dawncrow.de Subject: winex11: Remove dead assignment (clang) Message-Id: 8472d171-8b3b-04a7-62cf-a99ee7a37026@dawncrow.de Date: Mon, 30 Jan 2017 23:11:02 +0100
Signed-off-by: André Hentschel nerv@dawncrow.de
dlls/winex11.drv/xim.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index e51169d..3978bca 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -416,10 +416,7 @@ static BOOL open_xim( Display *display ) ximStyle = ximStyleNone;
if (ximStyleCallback == 0)
{ TRACE("No callback style available\n");
ximStyleCallback = ximStyle;
}
}
-- 2.7.4