CPP Check 1.1.31
James McKenzie
jjmckenzie51 at earthlink.net
Mon Oct 12 15:36:27 CDT 2009
Nikolay Sivov wrote:
> James McKenzie wrote:
>> Nikolay Sivov wrote:
>>
>>> James McKenzie wrote:
>>>
>>>> Nikolay Sivov wrote:
>>>>
>>>>
>>>>> chris ahrendt wrote:
>>>>>
>>>>>> [/home/cahrendt/wine-git/dlls/kernel32/resource.c:1279]: (error)
>>>>>> Division by zero
>>>>>>
>>>>> False positive I suppose:
>>>>>
>>>>> ---
>>>>> static const BYTE pad[] = {
>>>>>
>>>>> 'P','A','D','D','I','N','G','X','X','P','A','D','D','I','N','G' };
>>>>> DWORD i;
>>>>>
>>>>> -> for ( i = 0; i < size / sizeof pad; i++ )
>>>>> ---
>>>>>
>>>> Should pad be enclosed in parenthesis?
>>>>
>>>> James McKenzie
>>>>
>>> No, why?
>>>
>>>
>>>
>> I was thinking that c specifies sizeof needs the parameter to be
>> enclosed in parathesis like this sizeof (pad) but I may be incorrect.
>>
>> James McKenzie
>>
> This is for type names, variables could be used without enclosing.
>
>
Thank you for the clarification on the use of sizeof.
James McKenzie
More information about the wine-devel
mailing list