Paul Vriens : secur32/tests: Cast-qual warning fixes.

Michael Stefaniuc mstefani at redhat.com
Fri Jan 12 19:01:05 CST 2007


Alexandre Julliard wrote:
> Module: wine
> Branch: master
> Commit: 6c3efd1c32b1f9054e82a684da6ab54a599f252d
> URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6c3efd1c32b1f9054e82a684da6ab54a599f252d
> 
> Author: Paul Vriens <paul.vriens.wine at gmail.com>
> Date:   Fri Jan 12 14:01:16 2007 +0100
> 
> secur32/tests: Cast-qual warning fixes.

This breaks compilation with older gcc versions. At least with gcc-3.1.1
used by Smatch.

dlls/secur32/tests/schannel.c: In function `testAcquireSecurityContext':
dlls/secur32/tests/schannel.c:119: invalid initializer
make[2]: *** [schannel.o] Error 1

> 
> ---
> 
>  dlls/secur32/tests/schannel.c |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c
> index ca870f4..0bbd96b 100644
> --- a/dlls/secur32/tests/schannel.c
> +++ b/dlls/secur32/tests/schannel.c
> @@ -116,12 +116,13 @@ static void testAcquireSecurityContext(v
>      PCCERT_CONTEXT certs[2];
>      HCRYPTPROV csp;
>      static CHAR unisp_name_a[] = UNISP_NAME_A;
> +    static WCHAR ms_def_prov_w[] = MS_DEF_PROV_W;
Making that 'static const WCHAR ms_def_prov_w[]' fixes the compilation
error but renders the exercise moot.

>      BOOL ret;
>      HCRYPTKEY key;
>      CRYPT_KEY_PROV_INFO keyProvInfo;
>  
> -    keyProvInfo.pwszContainerName = (LPWSTR)cspNameW;
> -    keyProvInfo.pwszProvName = (LPWSTR)MS_DEF_PROV_W;
> +    keyProvInfo.pwszContainerName = cspNameW;
> +    keyProvInfo.pwszProvName = ms_def_prov_w;
>      keyProvInfo.dwProvType = PROV_RSA_FULL;
>      keyProvInfo.dwFlags = 0;
>      keyProvInfo.cProvParam = 0;

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart



More information about the wine-devel mailing list