[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1372665 - /subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp

From: Blair Zajac <blair_at_orcaware.com>
Date: Mon, 13 Aug 2012 17:38:15 -0700

On 08/13/2012 04:24 PM, philip_at_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
Received on 2012-08-14 02:40:33 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.