VirtualBox

Changeset 3245 in kBuild


Ignore:
Timestamp:
Dec 25, 2018 9:01:36 PM (6 years ago)
Author:
bird
Message:

kmkbuiltin.c/h: GCC warnings.

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin.c

    r3225 r3245  
    246246{
    247247#define BUILTIN_ENTRY(a_fn, a_sz, a_uFnSignature, fMtSafe, fNeedEnv) \
    248     {  { { sizeof(a_sz) - 1, a_sz, } }, \
    249        (uintptr_t)a_fn,                                 a_uFnSignature,   fMtSafe, fNeedEnv }
     248    {  { { sizeof(a_sz) - 1, a_sz, } }, { (uintptr_t)a_fn }, a_uFnSignature,   fMtSafe, fNeedEnv }
    250249
    251250    /* More frequently used commands: */
     
    322321            case 4: cchAndStart |= (size_t)pszCmd[3] << (K_ARCH_BITS - 32); /* fall thru */
    323322# endif
     323            /* fall thru - gcc 8.2.0 is confused by # endif */
    324324            case 3: cchAndStart |= (size_t)pszCmd[2] << (K_ARCH_BITS - 24); /* fall thru */
    325325            case 2: cchAndStart |= (size_t)pszCmd[1] << (K_ARCH_BITS - 16); /* fall thru */
     
    330330        switch (cchAndStart)
    331331        {
    332             default:                                   /* fall thru */
     332            default:                                        /* fall thru */
    333333# if K_ARCH_BITS >= 64
    334334            case 7: cchAndStart |= (size_t)pszCmd[6] << 56; /* fall thru */
     
    337337            case 4: cchAndStart |= (size_t)pszCmd[3] << 32; /* fall thru */
    338338# endif
     339            /* fall thru - gcc 8.2.0 is confused by # endif */
    339340            case 3: cchAndStart |= (size_t)pszCmd[2] << 24; /* fall thru */
    340341            case 2: cchAndStart |= (size_t)pszCmd[1] << 16; /* fall thru */
     
    483484            format_elapsed_nano(szTotal, sizeof(szTotal), g_aBuiltInStats[i].cNs);
    484485            format_elapsed_nano(szAvg, sizeof(szAvg), g_aBuiltInStats[i].cNs / g_aBuiltInStats[i].cTimes);
    485             fprintf(pOutput, "%s kmk_builtin_%-9s: %4lu times, %9s total, %9s/call\n",
     486            fprintf(pOutput, "%s kmk_builtin_%-9s: %4u times, %9s total, %9s/call\n",
    486487                    pszPrefix, g_aBuiltIns[i].uName.s.sz, g_aBuiltInStats[i].cTimes, szTotal, szAvg);
    487488        }
    488489        else if (g_aBuiltInStats[i].cAsyncTimes > 0)
    489             fprintf(pOutput, "%s kmk_builtin_%-9s: %4lu times in worker thread\n",
     490            fprintf(pOutput, "%s kmk_builtin_%-9s: %4u times in worker thread\n",
    490491                    pszPrefix, g_aBuiltIns[i].uName.s.sz, g_aBuiltInStats[i].cAsyncTimes);
    491492}
  • trunk/src/kmk/kmkbuiltin.h

    r3237 r3245  
    109109        struct
    110110        {
    111             char    cch;
    112             char    sz[15];
     111            unsigned char   cch;
     112            char            sz[15];
    113113        } s;
    114         size_t      cchAndStart;
     114        size_t              cchAndStart;
    115115    } uName;
    116116    union
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