[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: Huston, we have a problem: Q_UINT32 vs. unsigned long
From: Bo Thorsen <bo () sonofthor ! dk>
Date: 2004-06-22 7:01:57
Message-ID: 200406220901.57782.bo () sonofthor ! dk
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Monday 21 June 2004 17:10, Karl-Heinz Zimmer wrote:
> Hi all,
>
> just found that we are using a Q_UINT32 as return value of
>
> MessageProperty::serialChache()
>
> while we are using a simple "unsigned int" as parameter in nearly
> all of the messages working with the serNum, e.g. in
>
> KMMsgBase::getSerNum()
>
> and in many more of them.
>
> Sad to say I am in a terrible hurry to match a deadline so there is
> no chance I can dig into the code to trace all ways the serial numbers
> go and adjust them accordingly.
>
> But still: The issue is dangerous, it may break on 64bit machines.
>
> Who is able and has the time to solve this issue?
s/unsigned int/unsigned long/ up there.
The problem here is that Q_UINT32 is always a 32 bit unsigned number, but
an unsigned long is 64 bit on 64 bit platforms like the new Athlon 64s.
I haven't checked the code, only been pointed to the problem by
Karl-Heinz, and I don't know if it's a problem. But it looks to me like
we have a janitor job here to make all of them have the same size always.
It's of course tempting to take advantage of the bigger capability of a 64
bit system, but AFAIK the number stored in the index file is always 32
bit, so that's not possible.
Bo.
--
Bo Thorsen | Praestevejen 4
Senior Software Engineer | 5290 Marslev
Klarälvdalens Datakonsult | Denmark
[Attachment #5 (application/pgp-signature)]
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic