VirtualBox

Changeset 58153 in vbox


Ignore:
Timestamp:
Oct 9, 2015 1:42:14 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103260
Message:

cppcheck warnings

Location:
trunk/src/VBox/ValidationKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/VBoxBs2Linker.cpp

    r57358 r58153  
    6262                {
    6363                    fprintf(stderr, "syntax errro: Unknown options '%s'\n", pszOpt);
     64                    free(papszInputs);
    6465                    return 2;
    6566                }
     
    206207    }
    207208
     209    fclose(pOutput);
    208210    return rcExit;
    209211}
  • trunk/src/VBox/ValidationKit/snippets/alloc-1.c

    r57358 r58153  
    5353    if (cb / (1024 * 1024) != cMBs)
    5454        cb = ~(unsigned long)0 / (1024 * 1024) * (1024 * 1024);
    55     printf("alloc-1: allocating %lu MB (%lu bytes)\n", cb/1024/1024, cb);
     55    printf("alloc-1: allocating %ld MB (%lu bytes)\n", cb/1024/1024, cb);
    5656
    5757    /*
     
    6969        if (!pb)
    7070        {
    71             printf("\nalloc-1: calloc failed, cbDone=%lu MB (%lu bytes)\n",
    72                    cbDone/1024/1024/1024, cbDone);
     71            printf("\nalloc-1: calloc failed, cbDone=%ld MB (%lu bytes)\n",
     72                   cbDone/1024/1024, cbDone);
    7373            return 1;
    7474        }
  • trunk/src/VBox/ValidationKit/snippets/time-1.c

    r57358 r58153  
    7272        {
    7373#ifdef USE_CLOCK_MONOTONIC
    74             printf("tv_nsec in the past: %ld.%09d < %ld.%09d - %u nsec\n",
     74            printf("tv_nsec in the past: %ld.%09u < %ld.%09u - %d nsec\n",
    7575                   (long)pCur->tv_sec,  (unsigned)pCur->tv_nsec,
    7676                   (long)pPrev->tv_sec, (unsigned)pPrev->tv_nsec,
    7777                   (unsigned)pPrev->tv_nsec - (unsigned)pCur->tv_nsec);
    7878#else
    79             printf("tv_usec in the past: %ld.%06d < %ld.%06d - %u usec\n",
     79            printf("tv_usec in the past: %ld.%06u < %ld.%06u - %d usec\n",
    8080                   (long)pCur->tv_sec,  (unsigned)pCur->tv_usec,
    8181                   (long)pPrev->tv_sec, (unsigned)pPrev->tv_usec,
     
    8989        {
    9090#ifdef USE_CLOCK_MONOTONIC
    91             printf("tv_sec  in the past: %ld.%09d < %ld.%09d\n",
     91            printf("tv_sec  in the past: %ld.%09u < %ld.%09u\n",
    9292                   (long)pCur->tv_sec,  (unsigned)pCur->tv_nsec,
    9393                   (long)pPrev->tv_sec, (unsigned)pPrev->tv_nsec);
    9494#else
    95             printf("tv_sec  in the past: %ld.%06d < %ld.%06d\n",
     95            printf("tv_sec  in the past: %ld.%06u < %ld.%06u\n",
    9696                   (long)pCur->tv_sec,  (unsigned)pCur->tv_usec,
    9797                   (long)pPrev->tv_sec, (unsigned)pPrev->tv_usec);
Note: See TracChangeset for help on using the changeset viewer.

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