[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please test pending bugfix release of base

From: Richard Frith-Macdonald
Subject: Re: Please test pending bugfix release of base
Date: Sat, 18 Jun 2011 14:07:06 +0100

On 18 Jun 2011, at 12:08, Sebastian Reitenbach wrote:

> attached patches I also have in the ports tree since testing 
> gnustep-base-1.22.0. While I was testing there with clang, I spit out a 
> couple of compiler warnings, including suggestions how to fix it. So I 
> followed the suggestions to shut up clang.

Thanks ... there *is* a problem there, but if you followed clang's suggestions 
they were wrong.
The issue here is really that with the change of a lot of the API to use 
NSInteger and NSUInteger, print's formats are now correct or incorrect 
depending on the word size of the machine you are running on :-(
That' means you can't correct the printf format for one architecture without 
breaking it for another, so  your patch is wrong (though no worse than the 
current code).

The solution here might be to cast the argument to match the format string 
rather than trying to make the format string fit the argument.  The only 
problem with that is a possible loss of precision when casing a 64bit value to 
int/unsigned.  I'm not really certain what the *ideal* solution is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]