VirtualBox

Changeset 108336 in vbox


Ignore:
Timestamp:
Feb 23, 2025 8:14:28 PM (8 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167690
Message:

libs/xpcom18a4: Some cleanups, enable strict compiler checks for XPComBldProg, bugref:10321

Location:
trunk/src/libs/xpcom18a4
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/Config.kmk

    r106683 r108336  
    212212# Template for building XPCOM executables for running at build time.
    213213#
    214 # It extends the BLDPROG template in config.kmk but overrides CFLAGS
    215 # and CXXFLAGS completely at the moment.
    216 #
    217214TEMPLATE_XPComBldProg                     = XPCOM Build programs executables
    218215TEMPLATE_XPComBldProg_EXTENDS             = VBoxAdvBldProg
     
    227224        $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
    228225        $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
    229 TEMPLATE_XPComBldProg_CFLAGS             = $(filter-out $(VBOX_GCC_PEDANTIC_C), $(TEMPLATE_VBoxAdvBldProg_CFLAGS)) \
    230         $(VBOX_GCC_Wno-int-to-pointer-cast) $(VBOX_GCC_Wno-pointer-to-int-cast) $(VBOX_GCC_NON_PEDANTIC_C)
    231 TEMPLATE_XPComBldProg_CXXFLAGS.darwin    = $(TEMPLATE_VBoxAdvBldProg_CXXFLAGS.darwin)     -fpascal-strings -fshort-wchar -fno-common -fno-rtti
    232 TEMPLATE_XPComBldProg_CXXFLAGS.solaris   = $(TEMPLATE_VBoxAdvBldProg_CXXFLAGS.solaris)    -fno-omit-frame-pointer # for now anyway.
    233 TEMPLATE_XPComBldProg_LDFLAGS.darwin     = $(TEMPLATE_VBoxAdvBldProg_LDFLAGS.darwin)      -fpascal-strings -fshort-wchar -fno-rtti -fno-exceptions
    234226TEMPLATE_XPComBldProg_ORDERDEPS          = $(foreach hdrinst, $(filter %-HEADERS, $(INSTALLS)), $($(hdrinst)_1_TARGET))
    235227TEMPLATE_XPComBldProg_LATE_LIBS.darwin   = \
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.c

    r108321 r108336  
    8585xpidl_usage(int argc, char *argv[])
    8686{
    87     int i;
     87    RT_NOREF(argc);
    8888    fprintf(stderr, xpidl_usage_str, argv[0]);
    89     for (i = 0; modes[i].mode; i++) {
     89    for (int i = 0; modes[i].mode; i++) {
    9090        fprintf(stderr, "          %-12s  %-30s (.%s)\n", modes[i].mode,
    9191                modes[i].modeInfo, modes[i].suffix);
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c

    r108334 r108336  
    694694            {
    695695                write_indent(pFile);
    696                 int rc = xpidlHdrWriteAttrAccessor(pIt, pFile, true, true /*fDecl*/);
     696                rc = xpidlHdrWriteAttrAccessor(pIt, pFile, true, true /*fDecl*/);
    697697                if (RT_FAILURE(rc))
    698698                    FAIL;
     
    752752            {
    753753                write_indent(pFile);
    754                 int rc = xpidlHdrWriteAttrAccessor(pIt, pFile, true, true /*fDecl*/);
     754                rc = xpidlHdrWriteAttrAccessor(pIt, pFile, true, true /*fDecl*/);
    755755                if (RT_FAILURE(rc))
    756756                    FAIL;
     
    776776            case kXpidlNdType_Method:
    777777                write_indent(pFile);
    778                 int rc = write_method_signature(pIt, pFile, true /*fDecl*/);
     778                rc = write_method_signature(pIt, pFile, true /*fDecl*/);
    779779                if (RT_FAILURE(rc))
    780780                    FAIL;
     
    823823            {
    824824                write_indent(pFile);
    825                 int rc = xpidlHdrWriteAttrAccessor(pIt, pFile, true, true /*fDecl*/);
     825                rc = xpidlHdrWriteAttrAccessor(pIt, pFile, true, true /*fDecl*/);
    826826                if (RT_FAILURE(rc))
    827827                    FAIL;
     
    847847            case kXpidlNdType_Method:
    848848                write_indent(pFile);
    849                 int rc = write_method_signature(pIt, pFile, true /*fDecl*/);
     849                rc = write_method_signature(pIt, pFile, true /*fDecl*/);
    850850                if (RT_FAILURE(rc))
    851851                    FAIL;
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c

    r108334 r108336  
    240240static int xpidlParseError(PXPIDLPARSE pThis, PXPIDLINPUT pInput, PCRTSCRIPTLEXTOKEN pTok, int rc, const char *pszFmt, ...)
    241241{
     242    RT_NOREF(pInput);
     243
    242244    va_list Args;
    243245    va_start(Args, pszFmt);
     
    394396
    395397    if (   pTok->enmType == RTSCRIPTLEXTOKTYPE_PUNCTUATOR
    396         && pTok->Type.Keyword.pKeyword->u64Val == chPunctuator)
     398        && (char)pTok->Type.Keyword.pKeyword->u64Val == chPunctuator)
    397399    {
    398400        RTScriptLexConsumeToken(pInput->hIdlLex);
     
    954956        {
    955957            PCRTSCRIPTLEXTOKEN pTok;
    956             int rc = RTScriptLexQueryToken(pInput->hIdlLex, &pTok);
     958            rc = RTScriptLexQueryToken(pInput->hIdlLex, &pTok);
    957959            if (RT_FAILURE(rc))
    958960                return xpidlParseError(pThis, pInput, NULL, rc, "Lexer: Failed to query punctuator token with %Rrc", rc);
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_typelib.c

    r108333 r108336  
    365365{
    366366    XPTInterfaceDirectoryEntry *ide;
    367     int i;
    368367
    369368    /* boy, I sure hope qsort works correctly everywhere */
    370369#ifdef DEBUG_shaver_sort
    371370    fputs("before sort:\n", stderr);
    372     for (i = 0; i < IFACES(pThis); i++) {
     371    for (uint16_t i = 0; i < IFACES(pThis); i++) {
    373372        fputs("  ", stderr);
    374373        print_IID(&HEADER(pThis)->interface_directory[i].iid, stderr);
     
    380379#ifdef DEBUG_shaver_sort
    381380    fputs("after sort:\n", stderr);
    382     for (i = 0; i < IFACES(pThis); i++) {
     381    for (uint16_t i = 0; i < IFACES(pThis); i++) {
    383382        fputs("  ", stderr);
    384383        print_IID(&HEADER(pThis)->interface_directory[i].iid, stderr);
     
    557556    if (pNdType->enmType == kXpidlNdType_Parameter)
    558557    {
    559         const char *size_is;
    560         const char *length_is;
    561 
    562558        /* only if size_is is found does any of this matter */
    563559        PCXPIDLATTR pAttr = xpidlNodeAttrFind(pNdType, "size_is");
     
    11591155        interface_flags |= XPT_ID_FUNCTION;
    11601156
    1161     uint16_t u16Id = 0;
    11621157    ide = FindInterfaceByName(HEADER(pThis)->interface_directory,
    11631158                              HEADER(pThis)->num_interfaces, name,
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpt/src/xpt_arena.c

    r102334 r108336  
    9595#define LOG_MALLOC(_a, _req, _used)   ((void)0)
    9696#define LOG_REAL_MALLOC(_a, _size)    ((void)0)
    97 #define LOG_FREE(_a)                  ((void)0)
     97#define LOG_FREE(_a)                  RT_NOREF(_a)
    9898
    9999#define LOG_DONE_LOADING(_a)          ((void)0)
    100 #define PRINT_STATS(_a)               ((void)0)
     100#define PRINT_STATS(_a)               RT_NOREF(_a)
    101101
    102102#endif /* XPT_ARENA_LOGGING */
     
    290290        LOG_DONE_LOADING(arena);
    291291    }
     292#else
     293    RT_NOREF(arena);
    292294#endif
    293295}
     
    296298XPT_ArenaFree(XPTArena *arena, void *block)
    297299{
     300    RT_NOREF(block);
    298301    LOG_FREE(arena);
    299302}
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpt/src/xpt_struct.c

    r104489 r108336  
    798798                        XPTTypeDescriptor *type)
    799799{
     800    RT_NOREF(arena);
     801
    800802    pd->flags = flags & XPT_PD_FLAGMASK;
    801803    XPT_COPY_TYPE(pd->type, *type);
     
    817819DoTypeDescriptorPrefix(XPTArena *arena, XPTCursor *cursor, XPTTypeDescriptorPrefix *tdp)
    818820{
     821    RT_NOREF(arena);
    819822    return XPT_Do8(cursor, &tdp->flags);
    820823}
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpt/tools/xpt_link.c

    r104485 r108336  
    6060static int compare_IDE_with_zero(const void *ap);
    6161static int compare_IDEs_by_name(const void *ap, const void *bp);
     62#if 0 /* unused */
    6263static int compare_IDEs_by_name_space(const void *ap, const void *bp);
     64#endif
    6365static int compare_strings(const void *ap, const void *bp);
    6466static int compare_pointers(const void *ap, const void *bp);
     
    689691}
    690692
     693#if 0 /* unused */
    691694static int
    692695compare_IDEs_by_name_space(const void *ap,
     
    697700    return compare_strings(ide1->name_space, ide2->name_space);
    698701}
     702#endif
    699703
    700704static int
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