Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from incompatible pointer type
Shouldn't that line be:
res = GetUserNameW( userName, &sizeName );
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from incompatible pointer type
Shouldn't that line be:
res = GetUserNameW( userName, &sizeName );
Oh, and you also have to respect the coding style in the tests. Current style doesn't have spaces after opening brace and doesn't have space before closing brace and does have a space after the comma (and not before) for function parameters.
Paul Vriens wrote:
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from incompatible pointer type
Shouldn't that line be:
res = GetUserNameW( userName, &sizeName );
Oh, and you also have to respect the coding style in the tests. Current style doesn't have spaces after opening brace and doesn't have space before closing brace and does have a space after the comma (and not before) for function parameters.
I also ran the tests on some of my boxes. The following tests crashes on NT4:
r = GetUserProfileDirectoryW( htoken , NULL, NULL );
On Friday 06 March 2009 14:12:11 you wrote:
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from incompatible pointer type
Shouldn't that line be:
res = GetUserNameW( userName, &sizeName );
Oh, and you also have to respect the coding style in the tests. Current style doesn't have spaces after opening brace and doesn't have space before closing brace and does have a space after the comma (and not before) for function parameters.
hmm, at least it is not consistent:
66: res = get_tmp_space( 6 );
113: return default_dbgstr_wn(s, n, TRUE);
118: return default_dbgstr_wn( s, -1, TRUE);
There should be a tool to format source code, if this is regarded so important. One file is formatted this way, while some files are formatted the other way and mostly not consistently. So you need to do a bit guessing, what to do.
I also ran the tests on some of my boxes. The following tests crashes on NT4:
r = GetUserProfileDirectoryW( htoken , NULL, NULL );
So what should I do here - skip the test for NT4? Later versions seem to accept this.
Andreas Rosenberg wrote:
On Friday 06 March 2009 14:12:11 you wrote:
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from incompatible pointer type
Shouldn't that line be:
res = GetUserNameW( userName, &sizeName );
Oh, and you also have to respect the coding style in the tests. Current style doesn't have spaces after opening brace and doesn't have space before closing brace and does have a space after the comma (and not before) for function parameters.
hmm, at least it is not consistent:
66: res = get_tmp_space( 6 );
113: return default_dbgstr_wn(s, n, TRUE);
118: return default_dbgstr_wn( s, -1, TRUE);
There should be a tool to format source code, if this is regarded so important. One file is formatted this way, while some files are formatted the other way and mostly not consistently. So you need to do a bit guessing, what to do.
I also ran the tests on some of my boxes. The following tests crashes on NT4:
r = GetUserProfileDirectoryW( htoken , NULL, NULL );
So what should I do here - skip the test for NT4? Later versions seem to accept this.
We shouldn't check for versions but try to guess from behavior. One thing you could do is use the check that's already present:
234 /* Test for common environment variables (post NT4) */ 235 if (!GetEnvironmentVariableA("ALLUSERSPROFILE", NULL, 0))
Maybe not the best one (as somebody could set that env variable) but you get my drift.
The thing is that we want all tests to pass on all platforms (or if needed skipped).