d3dcompiler_43: Remove a no-op statement (PVS-Studio)
Michael Stefaniuc
mstefani at redhat.com
Wed Nov 19 10:34:05 CST 2014
On 11/19/2014 03:21 PM, Matteo Bruni wrote:
> 2014-11-19 9:10 GMT+01:00 Michael Stefaniuc <mstefani at redhat.de>:
>> D3DSRO_POSITION is 0.
>
> Yes, it is 0, but I still feel like it should stay there for
> consistency with the other cases.
As you wish, I'll drop the patch. But IMHO D3DSRO_POSITION is not a flag
but just the default when no flag is set.
> What I mean is that if that line is removed I'm pretty sure I'd be
> like "oh wow, this is clearly broken" every time I happen to look at
> that piece of code. But maybe that's just me.
For a split second I was thinking to replace it with a comment but that
wouldn't have increased the acceptance probability.
bye
michael
>
>> ---
>> dlls/d3dcompiler_43/bytecodewriter.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/dlls/d3dcompiler_43/bytecodewriter.c b/dlls/d3dcompiler_43/bytecodewriter.c
>> index 46187f9..71ee6c1 100644
>> --- a/dlls/d3dcompiler_43/bytecodewriter.c
>> +++ b/dlls/d3dcompiler_43/bytecodewriter.c
>> @@ -855,7 +855,6 @@ static DWORD map_vs_output(struct bc_writer *This, DWORD regnum, DWORD mask, DWO
>> *has_components = TRUE;
>> if(regnum == This->oPos_regnum) {
>> token |= (D3DSPR_RASTOUT << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK;
>> - token |= D3DSRO_POSITION & D3DSP_REGNUM_MASK; /* No shift */
>> return token;
>> }
>> if(regnum == This->oFog_regnum && mask == This->oFog_mask) {
>> --
>> 1.9.3
>
> Cheers,
> Matteo.
>
--
Michael Stefaniuc Tel.: +49-711-96437-199
Supervisor, APAC/EMEA IT Network Fax.: +49-711-96437-111
--------------------------------------------------------------------
Reg. Adresse: Red Hat GmbH, Werner-von-Siemens-Ring 14, 85630 Grasbrunn
Handelsregister: Amtsgericht Muenchen HRB 153243
Geschäftsführer: Charles Cachera, Michael Cunningham, Michael O'Neill,
Charles Peters
More information about the wine-devel
mailing list