Changeset 60:b87f8bb9944c in xplra


Ignore:
Timestamp:
04/04/13 15:56:27 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Removed %zu and %zd patterns, as it was not handled by the MingW compiler

Location:
test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • test/basicctest.c

    r55 r60  
    157157                                  "sim/aircraft/view/acf_descrip");
    158158    if (length<0) goto error;
    159     printf("Got %zu bytes, as a string: '%s'\n\n", length, result);
     159    printf("Got %lu bytes, as a string: '%s'\n\n", (unsigned long)length, result);
    160160
    161161    printf("Querying the aircraft's description as a dynamically created array with an offset of 3...\n");
     
    164164                                       "sim/aircraft/view/acf_descrip");
    165165    if (result1==0) goto error;
    166     printf("Got %zu bytes, as a string: '%s'\n\n", length1, result1);
     166    printf("Got %lu bytes, as a string: '%s'\n\n", (unsigned long)length1, result1);
    167167
    168168    printf("Querying the aircraft's engine types as an array of a fixed size...\n");
     
    171171
    172172    if (length<0) goto error;
    173     printf("Got %zd values:", length);
     173    printf("Got %ld values:", (long)length);
    174174    for(i = 0; i<length; ++i) {
    175175        if (i>0) printf(",");
     
    182182    result4 = xplra_get_int_array_new(&length1, 0, connectionID,
    183183                                      "sim/aircraft/prop/acf_en_type");
    184     printf("Got %zu values:", length1);
     184    printf("Got %lu values:", (unsigned long)length1);
    185185    for(j = 0; j<length1; ++j) {
    186186        if (j>0) printf(",");
     
    193193                                   0, connectionID,
    194194                                   "sim/aircraft/prop/acf_prop_dir");
    195     printf("Got %zd values:", length);
     195    printf("Got %ld values:", (long)length);
    196196    for(i = 0; i<length; ++i) {
    197197        if (i>0) printf(",");
     
    204204    result6 = xplra_get_float_array_new(&length1, 0, connectionID,
    205205                                        "sim/aircraft/prop/acf_prop_dir");
    206     printf("Got %zu values:", length1);
     206    printf("Got %lu values:", (unsigned long)length1);
    207207    for(j = 0; j<length1; ++j) {
    208208        if (j>0) printf(",");
  • test/basictest.cc

    r40 r60  
    9999        size_t length = xplane.getByteArray("sim/aircraft/view/acf_descrip",
    100100                                            result, sizeof(result)/sizeof(result[0]));
    101         printf("Got %zu bytes, as a string: '%s'\n\n", length, result);
     101        printf("Got %lu bytes, as a string: '%s'\n\n",
     102               static_cast<unsigned long>(length), result);
    102103
    103104        printf("Querying the aircraft's description as a dynamically created array...\n");
    104105        uint8_t* result1 = xplane.getByteArray("sim/aircraft/view/acf_descrip", length);
    105         printf("Got %zu bytes, as a string: '%s'\n\n", length, result1);
     106        printf("Got %lu bytes, as a string: '%s'\n\n",
     107               static_cast<unsigned long>(length), result1);
    106108
    107109        printf("Querying the aircraft's description as a string, with an offset of 3...\n");
     
    113115        length = xplane.getIntArray("sim/aircraft/prop/acf_en_type",
    114116                                    result3, sizeof(result3)/sizeof(result3[0]));
    115         printf("Got %zu values:", length);
     117        printf("Got %lu values:", static_cast<unsigned long>(length));
    116118        for(size_t i = 0; i<length; ++i) {
    117119            if (i>0) printf(",");
     
    123125        length = 0;
    124126        int32_t* result4 = xplane.getIntArray("sim/aircraft/prop/acf_en_type", length);
    125         printf("Got %zu values:", length);
     127        printf("Got %lu values:", static_cast<unsigned long>(length));
    126128        for(size_t i = 0; i<length; ++i) {
    127129            if (i>0) printf(",");
     
    134136        length = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir",
    135137                                      result5, sizeof(result5)/sizeof(result5[0]));
    136         printf("Got %zu values:", length);
     138        printf("Got %lu values:", static_cast<unsigned long>(length));
    137139        for(size_t i = 0; i<length; ++i) {
    138140            if (i>0) printf(",");
     
    144146        length = 0;
    145147        float* result6 = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir", length);
    146         printf("Got %zu values:", length);
     148        printf("Got %lu values:", static_cast<unsigned long>(length));
    147149        for(size_t i = 0; i<length; ++i) {
    148150            if (i>0) printf(",");
Note: See TracChangeset for help on using the changeset viewer.