-
Created attachment 4740 [details] Patch to remove redundant casts in mount.cifs client tool Also pullable from the 'cifs' branch git://dev.medozas.de/samba cifs
I don't think these casts are redundant. They are part of removing C++ warnings. From time to time I compile Samba with g++ which has a lot better warnings than gcc. And g++ does not accept the implicit cast from void * to char *. Or am I getting something wrong here? Volker
>From time to time I compile Samba with g++ What a killer argument :-o >And g++ does not accept the implicit cast from void * to char * No, because C++ is not C. That is a bit like... throwing a Java compiler at it and then adding casts for conversions from float to int. Not sure what to think of that. What _could possibly_ work is using static_cast() from http://tinyurl.com/yarr9pt , which provides static_cast<> semantics in C instead of the traditional (cast *) which acts like an error-hiding reinterpret_cast<> instead.
Well, if you need to force this patch into Samba against many patches that have gone into Samba over the last years to make it compile with C++, please discuss this on samba-technical. Thanks, Volker