Bug 370398 - trunk/VEX/priv/guest_x86_helpers.c:1693: strange expression ?
Summary: trunk/VEX/priv/guest_x86_helpers.c:1693: strange expression ?
Status: RESOLVED NOT A BUG
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.12 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-10 10:01 UTC by dcb314
Modified: 2016-10-17 15:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2016-10-10 10:01:39 UTC
trunk/VEX/priv/guest_x86_helpers.c:1693:1: warning: V684 A value of the variable 'tagw' is not modified. Consider inspecting the expression. It is possible that '1' should be present instead of '0'.

Source code is

         tagw |= (0 << (2*preg));

Maybe better code

         tagw |= (1 << (2*preg));
Comment 1 Julian Seward 2016-10-17 15:44:44 UTC
The code is as intended.  Compare with line 1688 (a few lines up) and you'll
see why it is written how it is.