Hi Robert,

Il 13.00 03/08/2003 Robert Collins ha scritto:

On Sun, 2003-08-03 at 20:15, Serassio Guido wrote:
> Hi Robert,

> But there is still an open problem: there are many C2664 errors that I
> can't understand.
>
> ACLIP.cc
> c:\work\nt-3.0\src\aclip.cc(424) : error C2664: 'delete' : cannot convert
> parameter 1 from 'const class acl_ip_data *const ' to 'void *'
>          Conversion loses qualifiers

This is operator delete refusing to delete a const pointer - I don't
know the standard well enough to comment if this is 'good behaviour' or
not. We can solve it two ways: remove my deleteSelf hack (there is a
test case that shows it shouldn't be needed - and the standard says it's
not needed). Or we can const_cast the pointers before deleting. I'd like
to get rid of the deleteSelf hack...

OK, please do you can give some hints, for me C++ is still an "alien" language.



> auth_digest.cc > C:\work\nt-3.0\src\auth\digest\auth_digest.cc(800) : error C2664: > 'httpHeaderPutStrf' : cannot convert parameter 2 from 'enum > digest_request_h::addHeader::http_hdr_type' to 'http_hdr_type' > Conversion to enumeration type requires an explicit cast > (static_cast, C-style cast or function-style cast)

try changing the "enum http_hdr_type type" at the top of the function to
"http_hdr_type type".

This worked.


Index: auth_digest.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/auth/digest/auth_digest.cc,v
retrieving revision 1.10
diff -u -p -r1.10 auth_digest.cc
--- auth_digest.cc      15 Jul 2003 02:12:43 -0000      1.10
+++ auth_digest.cc      3 Aug 2003 20:53:02 -0000
@@ -776,7 +776,7 @@ digest_request_h::direction()
 void
 digest_request_h::addHeader(HttpReply * rep, int accel)
 {
-    enum http_hdr_type type;
+    http_hdr_type type;

/* don't add to authentication error pages */

> store_dir_ufs.cc
> C:\work\nt-3.0\src\fs\ufs\store_dir_ufs.cc(1018) : error C2664:
> 'file_write' : cannot convert parameter 7 from 'void (void *)' to 'void
> (__cdecl *)(void *)'
> None of the functions with this name in scope match the target type


try adding an explicit cast to (__cdecl *)(void *) on the NULL.

Nothing to do, don't liked .....


Regards

Guido



-
========================================================
Guido Serassio
Acme Consulting S.r.l.
Via Gorizia, 69             10136 - Torino - ITALY
Tel. : +39.011.3249426      Fax. : +39.011.3293665
Email: [EMAIL PROTECTED]
WWW: http://www.acmeconsulting.it/

Reply via email to