rpcrt4: Remove unreachable code in EmbeddedComplexSize.

Rob Shearman robertshearman at gmail.com
Mon Aug 18 01:22:18 CDT 2008


2008/8/18 James McKenzie <jjmckenzie51 at earthlink.net>:
> Juan Lang wrote:
>> Hi James,
>>
>>
>>>> RPC_FC_ERROR_STATUS_T has a value of 0x10 and therefore isn't a
>>>> possible value of "flags_type & 0xf" in the switch statement.
>>>>
>>> This may be a really stupid question, but is it possible to generate
>>> this condition?
>>>
>>
>> No, it isn't possible.  0xf & (any value) will never produce any value
>> larger than 0xf.  0x10 > 0xf.
>>
> Juan:
>
> I meant is it possible to receive a RPC_FC_ERROR_STATUS_T  (0x010) in
> the original data before it is anded with 0x0f.  If this is possible,
> further changes may be needed.

This data comes from the IDL compiler. The format is specified here:
http://msdn.microsoft.com/en-us/library/aa379131(VS.85).aspx.

If the IDL compiler tries to put RPC_FC_ERROR_STATUS_T into the type
nibble then it is buggy. MIDL refuses to do so:

.\test.idl(66) : error MIDL2072 : inapplicable attribute : [range] [
Type 'error_status_t' ( Parameter 'l' ) ]

-- 
Rob Shearman



More information about the wine-devel mailing list