VirtualBox

Changeset 62041 in vbox for trunk/src


Ignore:
Timestamp:
Jul 6, 2016 10:55:13 AM (8 years ago)
Author:
vboxsync
Message:

Fix printf signed/unsigned mismatch. Drop redundant cast while here.
This effectively reverts previous, which must have been an error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/snippets/alloc-1.c

    r58153 r62041  
    5353    if (cb / (1024 * 1024) != cMBs)
    5454        cb = ~(unsigned long)0 / (1024 * 1024) * (1024 * 1024);
    55     printf("alloc-1: allocating %ld MB (%lu bytes)\n", cb/1024/1024, cb);
     55    printf("alloc-1: allocating %lu MB (%lu bytes)\n", cb/1024/1024, cb);
    5656
    5757    /*
     
    6969        if (!pb)
    7070        {
    71             printf("\nalloc-1: calloc failed, cbDone=%ld MB (%lu bytes)\n",
     71            printf("\nalloc-1: calloc failed, cbDone=%lu MB (%lu bytes)\n",
    7272                   cbDone/1024/1024, cbDone);
    7373            return 1;
     
    8888        {
    8989            if (!(uPctNow % 10))
    90                 printf("%u%%", (unsigned)uPctNow);
     90                printf("%u%%", uPctNow);
    9191            else
    9292                printf(".");
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette