Ignore:
Timestamp:
Feb 21, 2010, 5:32:09 PM (16 years ago)
Author:
rlwalsh
Message:

eliminate VACPP warning & info msgs - see Ticket #1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/crypt32/sip.c

    r21311 r21354  
    2121#include <stdarg.h>
    2222#include <stdio.h>
     23#include <string.h>
    2324
    2425#define WINE_LARGE_INTEGER /* for QuadPart in LARGE_INTEGER */
     
    177178
    178179    /* write the values */
    179     r = RegSetValueExW( hKey, szFuncName, 0, REG_SZ, (const BYTE*) szFunction,
     180    r = RegSetValueExW( hKey, szFuncName, 0, REG_SZ, (BYTE*) szFunction,
    180181                        ( lstrlenW( szFunction ) + 1 ) * sizeof (WCHAR) );
    181182    if( r != ERROR_SUCCESS ) goto error_close_key;
    182     r = RegSetValueExW( hKey, szDllName, 0, REG_SZ, (const BYTE*) szDll,
     183    r = RegSetValueExW( hKey, szDllName, 0, REG_SZ, (BYTE*) szDll,
    183184                        ( lstrlenW( szDll ) + 1) * sizeof (WCHAR) );
    184185
     
    282283    if (!lib)
    283284        goto end;
    284     func = GetProcAddress(lib, functionName);
     285    func = (void*)GetProcAddress(lib, functionName);
    285286    if (func)
    286287        *pLib = lib;
     
    456457                {
    457458                    HMODULE lib;
    458                     pfnIsFileSupported isMy = CRYPT_LoadSIPFuncFromKey(subKey,
    459                      &lib);
     459                    pfnIsFileSupported isMy =
     460                       (pfnIsFileSupported)CRYPT_LoadSIPFuncFromKey(subKey, &lib);
    460461
    461462                    if (isMy)
     
    494495                    {
    495496                        HMODULE lib;
    496                         pfnIsFileSupportedName isMy2 =
     497                        pfnIsFileSupportedName isMy2 = (pfnIsFileSupportedName)
    497498                         CRYPT_LoadSIPFuncFromKey(subKey, &lib);
    498499
     
    572573    { &providers_cs_debug.ProcessLocksList,
    573574    &providers_cs_debug.ProcessLocksList },
    574     0, 0, { (DWORD_PTR)(__FILE__ ": providers_cs") }
     575    0, 0, { (DWORD)(DWORD_PTR)(__FILE__ ": providers_cs") }
    575576};
    576577static RTL_CRITICAL_SECTION providers_cs = { &providers_cs_debug, -1, 0, 0, 0, 0 };
     
    584585        prov->subject = *pgSubject;
    585586        prov->info = *info;
    586         EnterCriticalSection(&providers_cs);
     587        EnterCriticalSection((CRITICAL_SECTION*)&providers_cs);
    587588        list_add_tail(&providers, &prov->entry);
    588         LeaveCriticalSection(&providers_cs);
     589        LeaveCriticalSection((CRITICAL_SECTION*)&providers_cs);
    589590    }
    590591}
     
    594595    WINE_SIP_PROVIDER *provider = NULL, *ret = NULL;
    595596
    596     EnterCriticalSection(&providers_cs);
     597    EnterCriticalSection((CRITICAL_SECTION*)&providers_cs);
    597598    LIST_FOR_EACH_ENTRY(provider, &providers, WINE_SIP_PROVIDER, entry)
    598599    {
     
    602603    if (provider && IsEqualGUID(pgSubject, &provider->subject))
    603604        ret = provider;
    604     LeaveCriticalSection(&providers_cs);
     605    LeaveCriticalSection((CRITICAL_SECTION*)&providers_cs);
    605606    return ret;
    606607}
     
    631632    HMODULE lib = NULL, temp = NULL;
    632633
    633     sip.pfGet = CRYPT_LoadSIPFunc(pgSubject, szGetSigned, &lib);
     634    sip.pfGet = (pCryptSIPGetSignedDataMsg)CRYPT_LoadSIPFunc(pgSubject, szGetSigned, &lib);
    634635    if (!sip.pfGet)
    635636        goto error;
    636     sip.pfPut = CRYPT_LoadSIPFunc(pgSubject, szPutSigned, &temp);
     637    sip.pfPut = (pCryptSIPPutSignedDataMsg)CRYPT_LoadSIPFunc(pgSubject, szPutSigned, &temp);
    637638    if (!sip.pfPut || temp != lib)
    638639        goto error;
    639640    FreeLibrary(temp);
    640     sip.pfCreate = CRYPT_LoadSIPFunc(pgSubject, szCreate, &temp);
     641    sip.pfCreate = (pCryptSIPCreateIndirectData)CRYPT_LoadSIPFunc(pgSubject, szCreate, &temp);
    641642    if (!sip.pfCreate || temp != lib)
    642643        goto error;
    643644    FreeLibrary(temp);
    644     sip.pfVerify = CRYPT_LoadSIPFunc(pgSubject, szVerify, &temp);
     645    sip.pfVerify = (pCryptSIPVerifyIndirectData)CRYPT_LoadSIPFunc(pgSubject, szVerify, &temp);
    645646    if (!sip.pfVerify || temp != lib)
    646647        goto error;
    647648    FreeLibrary(temp);
    648     sip.pfRemove = CRYPT_LoadSIPFunc(pgSubject, szRemoveSigned, &temp);
     649    sip.pfRemove = (pCryptSIPRemoveSignedDataMsg)CRYPT_LoadSIPFunc(pgSubject, szRemoveSigned, &temp);
    649650    if (!sip.pfRemove || temp != lib)
    650651        goto error;
     
    720721    TRACE("(%p %p %p)\n", pSubjectInfo, pcbIndirectData, pIndirectData);
    721722
    722     if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)))
     723    if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL)
    723724        ret = sip->info.pfCreate(pSubjectInfo, pcbIndirectData, pIndirectData);
    724725    TRACE("returning %d\n", ret);
     
    738739          pcbSignedDataMsg, pbSignedDataMsg);
    739740
    740     if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)))
     741    if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL)
    741742        ret = sip->info.pfGet(pSubjectInfo, pdwEncodingType, dwIndex,
    742743         pcbSignedDataMsg, pbSignedDataMsg);
     
    757758          cbSignedDataMsg, pbSignedDataMsg);
    758759
    759     if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)))
     760    if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL)
    760761        ret = sip->info.pfPut(pSubjectInfo, pdwEncodingType, pdwIndex,
    761762         cbSignedDataMsg, pbSignedDataMsg);
     
    775776    TRACE("(%p %d)\n", pSubjectInfo, dwIndex);
    776777
    777     if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)))
     778    if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL)
    778779        ret = sip->info.pfRemove(pSubjectInfo, dwIndex);
    779780    TRACE("returning %d\n", ret);
     
    792793    TRACE("(%p %p)\n", pSubjectInfo, pIndirectData);
    793794
    794     if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)))
     795    if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL)
    795796        ret = sip->info.pfVerify(pSubjectInfo, pIndirectData);
    796797    TRACE("returning %d\n", ret);
Note: See TracChangeset for help on using the changeset viewer.