|
From: Seth W. <bm...@pa...> - 2005-05-18 07:19:40
|
On May 17, 2005, at 11:29 PM, James W. Walker wrote:
> For a start, how about telling us which compiler you're using?
> XCode 1.5, XCode 2.0, CodeWarrior 8.3, CodeWarrior 9.5?
gcc 4 and 3.3. The result with both is exactly the same.
> Since TQ3Error is a typedef for an enumerated type, and
> kQ3ErrorNone is a member of that enumeration, I don't see how there
> could be a mismatch.
I have a simple chunk of code which looks like:
if (Q3Error_Get(nil) != kQ3ErrorNone) {
...
return kQ3Failure;
}
With d18 there's no error and all is well. With 1.7 however, this
returns true (this is while reading a 3DMF file). I was pretty
skeptical about there being anything actually wrong, so I did some
investigating. I first tried:
TQ3Error error = Q3Error_Get(nil);
printf("%s", Q3Error_ToString(kQ3LanguageEnglishUS, error));
if (error != kQ3ErrorNone) {
...
return kQ3Failure;
}
The result: "No error", yet when the != comparison is done, there
*is* an error. So I dug a bit further:
printf("Error: %i \n", error);
With gcc 4.0 I get:
warning: format '%i' expects type 'int', but argument 2 has type
'long long int'
My initial thought was that this was some gcc 4.0 incompatibility so
I reverted to 3.3 and got:
warning: int format, different type arg (arg 2)
However, with either version of gcc, if I use the framework I built
for 1.6d18 it works just fine.
-- Seth
|