Re: Garnome 2.13.3 on a Debian unstable distribution : errors in pwlib



> Olivier,
> 
> Your compiler is being "strict", which is not really a bad thing.
> 
> From your preprocessor output
> 
>    typedef unsigned char BYTE;
> 
> What the compiler is complaining about in this case is:
> 
>    PSSLPrivateKey::PSSLPrivateKey(const BYTE * keyData, PINDEX keySize)
>    {
>      key = d2i_AutoPrivateKey(NULL, (BYTE **)&keyData, keySize);
>    }
> 
> 
>    PSSLPrivateKey::PSSLPrivateKey(const PBYTEArray & keyData)
>    {
>      const BYTE * keyPtr = keyData;
>      key = d2i_AutoPrivateKey(NULL, (BYTE **)&keyPtr, keyData.GetSize());
>    }
> 
> 
> Here is something to try:
> 
>    replace (BYTE**)  => (const BYTE**)
> 
> 
> The other compiler complaints are similar:
> 
>    PSSLCertificate::PSSLCertificate(const BYTE * certData, PINDEX certSize)
>    {
>      certificate = d2i_X509(NULL, (unsigned char **)&certData, certSize);
>    }
> 
> 
>    PSSLCertificate::PSSLCertificate(const PBYTEArray & certData)
>    {
>      const BYTE * certPtr = certData;
>      certificate = d2i_X509(NULL, (unsigned char **)&certPtr,
>    certData.GetSize());
>    }
> 
> 
>    PSSLCertificate::PSSLCertificate(const PString & certStr)
>    {
>      PBYTEArray certData;
>      PBase64::Decode(certStr, certData);
>      if (certData.GetSize() > 0) {
>        const BYTE * certPtr = certData;
>        certificate = d2i_X509(NULL, (unsigned char **)&certPtr,
>    certData.GetSize());
>      }
>      else
>        certificate = NULL;
>    }
> 
> try:
> 
>    replace:  (unsigned char **) ==> (const unsigned char **)

Thanks, it worked! Would it not be useful to fix the problem in the
distribution itself?

-- 


			Olivier Lecarme




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]