VirtualBox

Changeset 103458 in vbox


Ignore:
Timestamp:
Feb 19, 2024 5:00:08 PM (9 months ago)
Author:
vboxsync
Message:

libs/xpcom: Remove some unused stuff, bugref:3409

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

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptsynch.c

    r102470 r103458  
    410410}  /* PR_WaitCondVar */
    411411
    412 static PRStatus PR_NotifyCondVar(PRCondVar *cvar)
    413 {
    414     Assert(cvar != NULL);   
    415     pt_PostNotifyToCvar(cvar, PR_FALSE);
    416     return PR_SUCCESS;
    417 }  /* PR_NotifyCondVar */
    418 
    419 static PRStatus PR_NotifyAllCondVar(PRCondVar *cvar)
    420 {
    421     Assert(cvar != NULL);
    422     pt_PostNotifyToCvar(cvar, PR_TRUE);
    423     return PR_SUCCESS;
    424 }  /* PR_NotifyAllCondVar */
    425 
    426412/**************************************************************/
    427413/**************************************************************/
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp

    r102506 r103458  
    4949static int DoMultipleInheritenceTest(int rcExit);
    5050static int DoMultipleInheritenceTest2(int rcExit);
     51#if 0 /*unused*/
    5152static void DoSpeedTest();
     53#endif
    5254
    5355
     
    14131415}
    14141416
     1417#if 0 /*unused*/
    14151418static void DoSpeedTest()
    14161419{
     
    14641467            (double)(interval_invoke-interval_direct)/(double)interval_invoke*100);
    14651468}
     1469#endif
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp

    r102457 r103458  
    18121812}
    18131813
    1814 #ifdef VBOX
    1815 /*
    1816  * From nsprpub, only caller below.
    1817  *
    1818  * @todo r=aeichner Implement an IPRT equivalent and replace.
    1819  */
    1820 static char *PL_strnstr(const char *big, const char *little, PRUint32 max)
    1821 {
    1822     size_t ll;
    1823 
    1824     if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
    1825     if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
    1826 
    1827     ll = strlen(little);
    1828     if( ll > (size_t)max ) return (char *)0;
    1829     max -= (PRUint32)ll;
    1830     max++;
    1831 
    1832     for( ; max && *big; big++, max-- )
    1833         if( *little == *big )
    1834             if( 0 == strncmp(big, little, ll) )
    1835                 return (char *)big;
    1836 
    1837     return (char *)0;
    1838 }
    1839 #endif
    1840 
    1841 struct ArrayAndPrefix
    1842 {
    1843     nsISupportsArray* array;
    1844     const char*       prefix;
    1845     PRUint32          length;
    1846 };
    1847 
    1848 PR_STATIC_CALLBACK(PLDHashOperator)
    1849 xpti_ArrayPrefixAppender(PLDHashTable *table, PLDHashEntryHdr *hdr,
    1850                          PRUint32 number, void *arg)
    1851 {
    1852     xptiInterfaceEntry* entry = ((xptiHashEntry*)hdr)->value;
    1853     ArrayAndPrefix* args = (ArrayAndPrefix*) arg;
    1854 
    1855     const char* name = entry->GetTheName();
    1856     if(name != PL_strnstr(name, args->prefix, args->length))
    1857         return PL_DHASH_NEXT;
    1858 
    1859     nsCOMPtr<nsIInterfaceInfo> ii;
    1860     if(NS_SUCCEEDED(EntryToInfo(entry, getter_AddRefs(ii))))
    1861         args->array->AppendElement(ii);
    1862     return PL_DHASH_NEXT;
    1863 }
    1864 
    18651814/* void autoRegisterInterfaces (); */
    18661815NS_IMETHODIMP xptiInterfaceInfoManager::AutoRegisterInterfaces()
  • trunk/src/libs/xpcom18a4/xpcom/tests/TestCRT.cpp

    r103140 r103458  
    4141#include <stdlib.h>
    4242
     43#ifdef DEBUG
    4344// The return from strcmp etc is only defined to be postive, zero or
    4445// negative. The magnitude of a non-zero return is irrelevant.
     
    5354    }
    5455}
    55 
     56#endif
    5657
    5758// Verify that nsCRT versions of string comparison routines get the
  • trunk/src/libs/xpcom18a4/xpcom/tests/nsIFileTest.cpp

    r103140 r103458  
    1515#include "nsCOMPtr.h"
    1616
    17 static void Passed();
    1817static void Failed(const char* explanation = nsnull);
    19 static void Inspect();
    2018static void Banner(const char* bannerString);
    2119
     
    3836
    3937//----------------------------------------------------------------------------
    40 static void Passed()
    41 //----------------------------------------------------------------------------
    42 {
    43     printf("Test passed.");
    44 }
    45 
    46 //----------------------------------------------------------------------------
    4738static void Failed(const char* explanation)
    4839//----------------------------------------------------------------------------
     
    5041    printf("ERROR : Test failed.\n");
    5142    printf("REASON: %s.\n", explanation);
    52 }
    53 
    54 //----------------------------------------------------------------------------
    55 static void Inspect()
    56 //----------------------------------------------------------------------------
    57 {
    58     printf("^^^^^^^^^^ PLEASE INSPECT OUTPUT FOR ERRORS\n");
    5943}
    6044
     
    171155
    172156}
    173 
    174 static void CreateUniqueTest(const char* creationPath, const char* appendPath,
    175                              PRInt32 whatToCreate, PRInt32 perm)
    176 {
    177     nsresult rv;
    178     nsCOMPtr<nsILocalFile> file =
    179         do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
    180 
    181     if (NS_FAILED(rv) || (!file))
    182     {
    183         printf("create nsILocalFile failed\n");
    184         return;
    185     }
    186 
    187     Banner("Creation Test");
    188     printf("creationPath == %s\nappendPath == %s\n", creationPath, appendPath);
    189 
    190     rv = file->InitWithNativePath(nsDependentCString(creationPath));
    191     VerifyResult(rv);
    192 
    193     printf("Appending %s\n", appendPath);
    194     rv = file->AppendNative(nsDependentCString(appendPath));
    195     VerifyResult(rv);
    196 
    197     printf("Check For Existence\n");
    198 
    199     PRBool exists;
    200     file->Exists(&exists);
    201 
    202     if (exists)
    203         printf("Yup!\n");
    204     else
    205         printf("no.\n");
    206 
    207 
    208     rv = file->CreateUnique(whatToCreate, perm);
    209     VerifyResult(rv);
    210 
    211     rv = file->Exists(&exists);
    212     VerifyResult(rv);
    213 
    214 
    215     if (!exists)
    216     {
    217         Failed("Did not create file system object!");
    218         return;
    219     }
    220 
    221 }
    222 
    223157
    224158static void CopyTest(const char *testFile, const char *targetDir)
     
    423357    registrar->AutoRegister(nsnull);
    424358
    425 #if defined(XP_WIN) || defined(XP_OS2)
    426     InitTest("c:\\temp\\", "sub1/sub2/"); // expect failure
    427     InitTest("d:\\temp\\", "sub1\\sub2\\"); // expect failure
    428 
    429     CreationTest("c:\\temp\\", "file.txt", nsIFile::NORMAL_FILE_TYPE, 0644);
    430     DeletionTest("c:\\temp\\", "file.txt", PR_FALSE);
    431 
    432     MoveTest("c:\\newtemp\\", "d:");
    433 
    434     CreationTest("c:\\temp\\", "mumble\\a\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\", nsIFile::DIRECTORY_TYPE, 0644);
    435     DeletionTest("c:\\temp\\", "mumble", PR_TRUE);
    436 
    437     CreateUniqueTest("c:\\temp\\", "foo", nsIFile::NORMAL_FILE_TYPE, 0644);
    438     CreateUniqueTest("c:\\temp\\", "foo", nsIFile::NORMAL_FILE_TYPE, 0644);
    439     CreateUniqueTest("c:\\temp\\", "bar.xx", nsIFile::DIRECTORY_TYPE, 0644);
    440     CreateUniqueTest("c:\\temp\\", "bar.xx", nsIFile::DIRECTORY_TYPE, 0644);
    441     DeletionTest("c:\\temp\\", "foo", PR_TRUE);
    442     DeletionTest("c:\\temp\\", "foo-1", PR_TRUE);
    443     DeletionTest("c:\\temp\\", "bar.xx", PR_TRUE);
    444     DeletionTest("c:\\temp\\", "bar-1.xx", PR_TRUE);
    445 
    446 #else
    447 #ifdef XP_UNIX
    448359    InitTest("/tmp/", "sub1/sub2/"); // expect failure
    449360
     
    465376    DeletionTest("/tmp", "foo", PR_TRUE);
    466377
    467 #endif /* XP_UNIX */
    468 #endif /* XP_WIN || XP_OS2 */
    469378    return 0;
    470379}
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c

    r62449 r103458  
    281281    fputs("#define NS_DECL_", state->file);
    282282    classNameUpper = xpidl_strdup(className);
     283    if (!classNameUpper)
     284        FAIL;
     285
    283286    for (cp = classNameUpper; *cp != '\0'; cp++)
    284287        *cp = toupper(*cp);
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