j
k
j a
j l
James McKenzie wrote:
Nikolay Sivov wrote: ...James McKenzie wrote: ...Nikolay Sivov wrote: ...chris ahrendt wrote: ...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
Nikolay Sivov wrote:
James McKenzie wrote: ...Nikolay Sivov wrote: ...chris ahrendt wrote: ...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?
Nikolay Sivov wrote: ...chris ahrendt wrote: ...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
chris ahrendt wrote: ...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++ )
chris ahrendt wrote:
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;
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.
This is for type names, variables could be used without enclosing.
Show replies by date
James McKenzie wrote: ...Nikolay Sivov wrote: ...James McKenzie wrote: ...Nikolay Sivov wrote: ...chris ahrendt wrote: ...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.
On 10/12/2009 10:36 PM, James McKenzie wrote:
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 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.
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
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?
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
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++ )
> [/home/cahrendt/wine-git/dlls/kernel32/resource.c:1279]: (error) > Division by zero > False positive I suppose:
sizeof is not a function but an operator. Thus the same rules apply to it as to other operators. People just like to write sizeof as a function.
bye michael
wine-devel@winehq.org
Add to favorites Remove from favorites