Am Fre, 2002-11-15 um 05.17 schrieb Alexandre Julliard:
ChangeSet ID: 6302 Modified files: programs/rundll32: rundll32.c dlls/kernel : computername.c
Log message: Warning fixes.
Your compiler seems to issue more warnings than mine :-/ It is good to see these patches are really reviewed. The lenW thingy is really embarrassing for me.
Two questions/remarks:
@@ -426,12 +426,13 @@ memcpy( name, buf, len ); name[len] = 0; *size = len; + ret = TRUE;
This shouldn't be necessary because the whole block is executed only if ret == TRUE.
} } __EXCEPT(page_fault) { SetLastError( ERROR_INVALID_PARAMETER ); - ret = FALSE; + return FALSE; } __ENDTRY
What is the point of this one? (applies also to the last hunk)
Martin
Martin Wilck Martin.Wilck@Fujitsu-Siemens.com writes:
@@ -426,12 +426,13 @@ memcpy( name, buf, len ); name[len] = 0; *size = len;
ret = TRUE;
This shouldn't be necessary because the whole block is executed only if ret == TRUE.
I know that, but the compiler doesn't... Because the exception macros use setjmp the compiler has to assume that variables change, even if they don't. It could be possible to restructure the code to avoid the extra assignment, I just didn't want to risk breaking it.
{ SetLastError( ERROR_INVALID_PARAMETER );
ret = FALSE;
return FALSE; } __ENDTRY
What is the point of this one? (applies also to the last hunk)
It makes no difference to the code, it's only to help with the warnings.