Changeset 15803 in webkit for trunk/JavaScriptCore/API/testapi.c


Ignore:
Timestamp:
Aug 4, 2006, 2:12:32 PM (19 years ago)
Author:
beidson
Message:

Reviewed by Geoff's rubber stamp

Fix a build break on Intel hardware causes by adapting stricter
compiler warnings (-Wshorten-64-to-32)

  • API/testapi.c: (assertEqualsAsNumber): manually cast some doubles to floats (main): ditto
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/testapi.c

    r15497 r15803  
    4747{
    4848    double number = JSValueToNumber(context, value, NULL);
    49     if (number != expectedValue && !(isnan(number) && isnan(expectedValue)))
     49
     50    // FIXME <rdar://4668451> - On i386 the isnan(double) macro tries to map to the isnan(float) function,
     51    // causing a build break with -Wshorten-64-to-32 enabled.  The issue is known by the appropriate team.
     52    // After that's resolved, we can remove these casts
     53    if (number != expectedValue && !(isnan((float)number) && isnan((float)expectedValue)))
    5054        fprintf(stderr, "assertEqualsAsNumber failed: %p, %lf\n", value, expectedValue);
    5155}
     
    561565   
    562566    exception = NULL;
    563     assert(isnan(JSValueToNumber(context, jsObjectNoProto, &exception)));
     567    // FIXME <rdar://4668451> - On i386 the isnan(double) macro tries to map to the isnan(float) function,
     568    // causing a build break with -Wshorten-64-to-32 enabled.  The issue is known by the appropriate team.
     569    // After that's resolved, we can remove these casts
     570    assert(isnan((float)JSValueToNumber(context, jsObjectNoProto, &exception)));
    564571    assert(exception);
    565572
Note: See TracChangeset for help on using the changeset viewer.