[Kde-pim] [patch] kdepim & kdepimlibs fixes for msvc 2k3+ (and some other non-gcc compilers)

Marc Mutz marc at kdab.net
Thu Dec 13 10:11:18 GMT 2007


Hi Jaroslaw,

On Tuesday December 11 2007 18:05, Jaroslaw Staniek wrote:
> >> -  if ( const GpgME::Error err = setup() )
> >> +  const GpgME::Error err = setup();
> >> +  if ( err )
> >>      return mError = err;
> >
> > Veto. There must be a better way. 2k3 is pretty conforming, afair, I'm
> > very surprised it doesn't manage to compile these declarations. Please
> > find the real reason for the compiler breakage, instead of this ugly
> > band-aid.
>
> Reverted this change.

No, this is still in there.

> Problem with 'max' is now fixed in kdesupport.

I still see
> + #undef max
in the patch...

More comments:
> -  if ( error || !ctx )
> +  if ( err.encodedError() || !ctx )
(multiple occurrences)

I thought you kept operator unspecified-bool-type()? Why do you 
use .encodedError() in a boolean context?

> -                 gpg_err_code( ei->error ) == GPG_ERR_NO_ERROR ) {
> +                 gpg_err_code( ei->error.code() ) == GPG_ERR_NO_ERROR ) {

ei->error.code() == GPG_ERR_NO_ERROR

Actually, since you're only using ei->error.encodedError(), you might want to 
turn ei->error into a gpg_error_t, or an unsigned int.

Thanks,
Marc

-- 
Marc Mutz - marc at kdab.com, mutz at kde.org - Klarälvdalens Datakonsult AB
Platform-independent software solutions - www.kdab.com info at kdab.com
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list