subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blair Zajac <bl...@orcaware.com>
Subject Re: svn commit: r1372665 - /subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp
Date Tue, 14 Aug 2012 00:38:15 GMT
On 08/13/2012 04:24 PM, philip@apache.org wrote:
> Author: philip
> Date: Mon Aug 13 23:24:06 2012
> New Revision: 1372665
>
> URL: http://svn.apache.org/viewvc?rev=1372665&view=rev
> Log:
> Fix C++ compile errors.
>
> * subversion/libsvn_auth_kwallet/kwallet.cpp
>    (): Include svn_base64.h.
>    (kwallet_master_passphrase_first_creds,
>     kwallet_master_passphrase_save_creds): Cast from void *.
>
> Modified:
>      subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp
>
> Modified: subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp
> URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp?rev=1372665&r1=1372664&r2=1372665&view=diff
> ==============================================================================
> --- subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp
(original)
> +++ subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp
Mon Aug 13 23:24:06 2012
> @@ -40,6 +40,7 @@
>   #include "svn_pools.h"
>   #include "svn_string.h"
>   #include "svn_version.h"
> +#include "svn_base64.h"
>
>   #include "private/svn_auth_private.h"
>
> @@ -483,7 +484,8 @@ kwallet_master_passphrase_first_creds(vo
>     if (done && passphrase)
>       {
>         svn_auth_cred_master_passphrase_t *creds;
> -      creds = apr_pcalloc(pool, sizeof(*creds));
> +      creds = (svn_auth_cred_master_passphrase_t *)apr_pcalloc(pool,
> +                                                               sizeof(*creds));

Hi Philip,

I think it's better to use C++ style casts in a C++ body than C style 
cases.  I'll reference the Google C++ style guide, even though we 
haven't said we use it:

http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Casting

Blair


Mime
View raw message