зеркало из https://github.com/mozilla/pjs.git
Fix some build warnings. Bug 157378, patch by
Roland.Mainz@informatik.med.uni-giessen.de (Roland Mainz), r=bbaetz, biesi, sr=bzbarsky, a=asa
This commit is contained in:
Родитель
7b2526fc6d
Коммит
52d3bba352
|
@ -137,8 +137,8 @@ struct nsFontFamily
|
|||
|
||||
struct nsFontFamilyName
|
||||
{
|
||||
char* mName;
|
||||
char* mXName;
|
||||
const char* mName;
|
||||
const char* mXName;
|
||||
};
|
||||
|
||||
struct nsFontPropertyName
|
||||
|
@ -1045,7 +1045,7 @@ InitGlobals(nsIDeviceContext *aDevice)
|
|||
nsFontFamilyName* f = gFamilyNameTable;
|
||||
while (f->mName) {
|
||||
nsCStringKey key(f->mName);
|
||||
gAliases->Put(&key, f->mXName);
|
||||
gAliases->Put(&key, (void *)f->mXName);
|
||||
f++;
|
||||
}
|
||||
gWeights = new nsHashtable();
|
||||
|
@ -3174,11 +3174,13 @@ nsFontMetricsGTK::PickASizeAndLoad(nsFontStretch* aStretch,
|
|||
return AddToLoadedFontsList(font);
|
||||
}
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
static int
|
||||
CompareSizes(const void* aArg1, const void* aArg2, void *data)
|
||||
{
|
||||
return (*((nsFontGTK**) aArg1))->mSize - (*((nsFontGTK**) aArg2))->mSize;
|
||||
}
|
||||
PR_END_EXTERN_C
|
||||
|
||||
void
|
||||
nsFontStretch::SortSizes(void)
|
||||
|
@ -4953,6 +4955,7 @@ EnumerateNode(void* aElement, void* aData)
|
|||
return PR_TRUE; // continue
|
||||
}
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
static int
|
||||
CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)
|
||||
{
|
||||
|
@ -4963,6 +4966,7 @@ CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)
|
|||
|
||||
return nsCRT::strcmp(str1, str2);
|
||||
}
|
||||
PR_END_EXTERN_C
|
||||
|
||||
static nsresult
|
||||
EnumFonts(nsIAtom* aLangGroup, const char* aGeneric, PRUint32* aCount,
|
||||
|
|
|
@ -110,7 +110,9 @@ static PRLogModuleInfo *FontMetricsXlibLM = PR_NewLogModule("FontMetricsXlib");
|
|||
|
||||
/* Local prototypes */
|
||||
static PRBool FreeNode(nsHashKey* aKey, void* aData, void* aClosure);
|
||||
#ifdef USE_FREETYPE
|
||||
static void CharSetNameToCodeRangeBits(const char*, PRUint32*, PRUint32*);
|
||||
#endif /* USE_FREETYPE */
|
||||
static nsFontCharSetMapXlib *GetCharSetMap(const char *aCharSetName);
|
||||
|
||||
// the font catalog is so expensive to generate
|
||||
|
@ -222,14 +224,16 @@ static PRInt32 gBitmapScaleMinimum = 10;
|
|||
static double gBitmapOversize = 1.2;
|
||||
static double gBitmapUndersize = 0.8;
|
||||
|
||||
#ifdef USE_AASB
|
||||
static PRInt32 gAntiAliasMinimum = 8;
|
||||
#endif /* USE_AASB */
|
||||
static PRInt32 gEmbeddedBitmapMaximumHeight = 1000000;
|
||||
|
||||
#ifdef USE_FREETYOE
|
||||
#ifdef USE_FREETYPE
|
||||
static PRBool gEnableFreeType2 = PR_TRUE;
|
||||
static PRBool gFreeType2Autohinted = PR_FALSE;
|
||||
static PRBool gFreeType2Unhinted = PR_TRUE;
|
||||
#endif /* USE_FREETYOE */
|
||||
#endif /* USE_FREETYPE */
|
||||
#ifdef USE_AASB
|
||||
static PRUint8 gAATTDarkTextMinValue = 64;
|
||||
static double gAATTDarkTextGain = 0.8;
|
||||
|
@ -3262,7 +3266,9 @@ nsFontMetricsXlib::PickASizeAndLoad(nsFontStretchXlib* aStretch,
|
|||
|
||||
PRBool use_scaled_font = PR_FALSE;
|
||||
PRBool have_nearly_rightsized_bitmap = PR_FALSE;
|
||||
#ifdef USE_AASB
|
||||
nsFontXlib *base_aafont = nsnull;
|
||||
#endif /* USE_AASB */
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
#define ALWAYS_USE_SCALED_FONTS_FOR_XPRINT 1
|
||||
|
@ -3463,11 +3469,13 @@ nsFontMetricsXlib::PickASizeAndLoad(nsFontStretchXlib* aStretch,
|
|||
return AddToLoadedFontsList(font);
|
||||
}
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
static int
|
||||
CompareSizes(const void* aArg1, const void* aArg2, void *data)
|
||||
{
|
||||
return (*((nsFontXlib**) aArg1))->mSize - (*((nsFontXlib**) aArg2))->mSize;
|
||||
}
|
||||
PR_END_EXTERN_C
|
||||
|
||||
void
|
||||
nsFontStretchXlib::SortSizes(void)
|
||||
|
@ -5340,6 +5348,7 @@ EnumerateNode(void* aElement, void* aData)
|
|||
return PR_TRUE; // continue
|
||||
}
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
static int
|
||||
CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)
|
||||
{
|
||||
|
@ -5350,6 +5359,7 @@ CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)
|
|||
|
||||
return nsCRT::strcmp(str1, str2);
|
||||
}
|
||||
PR_END_EXTERN_C
|
||||
|
||||
static nsresult
|
||||
EnumFonts(nsIAtom* aLangGroup, const char* aGeneric, PRUint32* aCount,
|
||||
|
@ -5441,6 +5451,7 @@ nsFontCharSetMapXlib *GetCharSetMap(const char *aCharSetName)
|
|||
return charSetMap;
|
||||
}
|
||||
|
||||
#ifdef USE_FREETYPE
|
||||
static
|
||||
void CharSetNameToCodeRangeBits(const char *aCharset,
|
||||
PRUint32 *aCodeRange1, PRUint32 *aCodeRange2)
|
||||
|
@ -5451,4 +5462,5 @@ void CharSetNameToCodeRangeBits(const char *aCharset,
|
|||
*aCodeRange1 = charSetInfo->mCodeRange1Bits;
|
||||
*aCodeRange2 = charSetInfo->mCodeRange2Bits;
|
||||
}
|
||||
#endif /* USE_FREETYPE */
|
||||
|
||||
|
|
|
@ -440,7 +440,6 @@ nsRenderingContextXlib::SetClipRect(const nsRect& aRect, nsClipCombine aCombine,
|
|||
{
|
||||
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::SetClipRect()\n"));
|
||||
nsRect trect = aRect;
|
||||
Region rgn;
|
||||
mTranMatrix->TransformCoord(&trect.x, &trect.y,
|
||||
&trect.width, &trect.height);
|
||||
switch(aCombine) {
|
||||
|
@ -482,7 +481,6 @@ NS_IMETHODIMP
|
|||
nsRenderingContextXlib::SetClipRegion(const nsIRegion& aRegion, nsClipCombine aCombine, PRBool &aClipState)
|
||||
{
|
||||
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::SetClipRegion()\n"));
|
||||
Region rgn;
|
||||
switch(aCombine)
|
||||
{
|
||||
case nsClipCombine_kIntersect:
|
||||
|
|
|
@ -3973,8 +3973,7 @@ xxlib_rgb_ditherable (XlibRgbHandle *handle)
|
|||
Colormap
|
||||
xxlib_rgb_get_cmap (XlibRgbHandle *handle)
|
||||
{
|
||||
/* xxlib_rgb_init (); */
|
||||
return (handle)?(handle->cmap):(NULL);
|
||||
return (handle)?(handle->cmap):(None);
|
||||
}
|
||||
|
||||
Visual *
|
||||
|
@ -4084,7 +4083,7 @@ Bool xxlib_register_handle(const char *name, XlibRgbHandle *handle)
|
|||
Bool xxlib_deregister_handle(const char *name)
|
||||
{
|
||||
RegisteredHandle *entry;
|
||||
if (entry = xxlib_find_registered_handle(name))
|
||||
if ((entry = xxlib_find_registered_handle(name)) != NULL)
|
||||
{
|
||||
free((void *)entry->name);
|
||||
entry->name = NULL;
|
||||
|
|
|
@ -389,7 +389,7 @@ nsresult nsXPrintContext::SetMediumSize(const char *aPaperName)
|
|||
char *s;
|
||||
|
||||
/* Did we get a tray name and paper name (e.g. "manual/din-a4") ? */
|
||||
if (s = strchr(paper_name, '/'))
|
||||
if ((s = strchr(paper_name, '/')) != nsnull)
|
||||
{
|
||||
const char *tray_name;
|
||||
*s = '\0';
|
||||
|
|
|
@ -787,7 +787,7 @@ XPPrinterList XpuGetPrinterList( const char *printer, int *res_list_count )
|
|||
{
|
||||
Display *pdpy;
|
||||
|
||||
if( pdpy = XOpenDisplay(display) )
|
||||
if( (pdpy = XOpenDisplay(display)) != NULL )
|
||||
{
|
||||
XPPrinterList list;
|
||||
int list_count;
|
||||
|
|
|
@ -44,14 +44,12 @@
|
|||
#include <prthread.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#else
|
||||
#ifdef __sun
|
||||
#include <wait.h>
|
||||
#endif /* __sun */
|
||||
#endif /* XPU_USE_NSPR */
|
||||
#endif /* XPU_USE_THREADS */
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
/* local prototypes */
|
||||
#ifdef DEBUG
|
||||
|
|
Загрузка…
Ссылка в новой задаче