VirtualBox

Changeset 104010 in vbox


Ignore:
Timestamp:
Mar 23, 2024 1:24:05 AM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162398
Message:

*: Fixed various calloc argument order warnings from gcc 14.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/bldprog-strtab-template.cpp.h

    r103004 r104010  
    252252#endif
    253253    cMaxStrings *= 2;
    254     pThis->papStrHash = (PBLDPROGSTRING *)calloc(sizeof(pThis->papStrHash[0]), cMaxStrings);
     254    pThis->papStrHash = (PBLDPROGSTRING *)calloc(cMaxStrings, sizeof(pThis->papStrHash[0]));
    255255    if (pThis->papStrHash)
    256256    {
    257257        pThis->cStrHash = cMaxStrings;
    258258#ifdef BLDPROG_STRTAB_WITH_COMPRESSION
    259         pThis->papPendingStrings = (PBLDPROGSTRING *)calloc(sizeof(pThis->papPendingStrings[0]), pThis->cMaxPendingStrings);
     259        pThis->papPendingStrings = (PBLDPROGSTRING *)calloc(pThis->cMaxPendingStrings, sizeof(pThis->papPendingStrings[0]));
    260260        if (pThis->papPendingStrings)
    261261#endif
  • trunk/src/VBox/Runtime/common/asn1/oiddb2c.cpp

    r98103 r104010  
    247247    if (!g_pOidRoot)
    248248    {
    249         g_pOidRoot = (PRAWOIDNODE)calloc(sizeof(*g_pOidRoot), 1);
     249        g_pOidRoot = (PRAWOIDNODE)calloc(1, sizeof(*g_pOidRoot));
    250250        if (!g_pOidRoot)
    251251            return error("Out of memory!\n");
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp

    r98103 r104010  
    371371static POMFWRITER omfWriter_Create(const char *pszSrc, uint32_t cSegments, uint32_t cSymbols, FILE *pDst)
    372372{
    373     POMFWRITER pThis = (POMFWRITER)calloc(sizeof(OMFWRITER), 1);
     373    POMFWRITER pThis = (POMFWRITER)calloc(1, sizeof(OMFWRITER));
    374374    if (pThis)
    375375    {
     
    377377        pThis->idxNextName   = 1;       /* We start counting at 1. */
    378378        pThis->cSegments     = cSegments;
    379         pThis->paSegments    = (POMFTOSEGDEF)calloc(sizeof(OMFTOSEGDEF), cSegments);
     379        pThis->paSegments    = (POMFTOSEGDEF)calloc(cSegments, sizeof(OMFTOSEGDEF));
    380380        if (pThis->paSegments)
    381381        {
    382382            pThis->cSymbols  = cSymbols;
    383             pThis->paSymbols = (POMFSYMBOL)calloc(sizeof(OMFSYMBOL), cSymbols);
     383            pThis->paSymbols = (POMFSYMBOL)calloc(cSymbols, sizeof(OMFSYMBOL));
    384384            if (pThis->paSymbols)
    385385            {
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