Fixed some warning messages that started showing up when I moved to

the real compiler.
r=kedl
This commit is contained in:
Jerry.Kirk%Nexwarecorp.com 1999-12-06 13:45:33 +00:00
Родитель 28be607e6e
Коммит d4cb5e4cd7
8 изменённых файлов: 22 добавлений и 12 удалений

Просмотреть файл

@ -138,7 +138,7 @@ NS_IMETHODIMP nsDrawingSurfacePh :: Lock(PRInt32 aX, PRInt32 aY,
PhDim_t dim;
short bytes_per_pixel = 3;
image = PR_CALLOC( sizeof(PhImage_t) );
image = (PhImage_t *) PR_CALLOC( sizeof(PhImage_t) );
if (image == NULL)
{
abort();
@ -293,7 +293,7 @@ NS_IMETHODIMP nsDrawingSurfacePh :: Init( PhGC_t * &aGC, PRUint32 aWidth,
abort();
}
mPixmap = PR_CALLOC(sizeof(PhImage_t) );
mPixmap = (PhImage_t *) PR_CALLOC(sizeof(PhImage_t) );
if (mPixmap == NULL)
{
NS_ASSERTION(NULL, "nsDrawingSurfacePh::Init can't CALLOC pixmap, out of memory");

Просмотреть файл

@ -163,8 +163,10 @@ nsresult nsImagePh :: Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth,nsMas
mImage.size.w = mWidth;
mImage.size.h = mHeight;
mImage.palette_tag = 0; // REVISIT - A CRC value for PhRelay ???
#ifdef PHOTON1_ONLY
mImage.xscale = 1; // scaling is integral only
mImage.yscale = 1;
#endif
mImage.format = 0; // not used
mImage.flags = 0;
mImage.ghost_bpl = 0;
@ -485,8 +487,8 @@ NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsDrawingSurface
/* Try to dump the image to a BMP file */
PR_LOG(PhGfxLog, PR_LOG_DEBUG,("nsImagePh::Draw2 Dump image to BMP\n"));
unsigned char *ptr;
ptr = mImage.image;
char *ptr;
ptr = (char *) mImage.image;
PR_LOG(PhGfxLog, PR_LOG_DEBUG,("nsImagePh::Draw2 Dump image info w,h,d=(%d,%d,%d) mColorMap=<%p> \n",
mWidth, mHeight, mDepth, mColorMap));

Просмотреть файл

@ -304,10 +304,10 @@ void nsRegionPh :: GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRI
{
PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRegionPh::GetBoundingBox t=<%p> t->next=<%p>\n", t, t->next));
*aX = min(*aX, tulx);
*aY = min(*aY, tuly);
bX = max(bX, tlrx);
bY = max(bY, tlry);
*aX = PR_MIN(*aX, tulx);
*aY = PR_MIN(*aY, tuly);
bX = PR_MAX(bX, tlrx);
bY = PR_MAX(bY, tlry);
t = t->next;
}

Просмотреть файл

@ -865,7 +865,8 @@ NS_IMETHODIMP nsRenderingContextPh :: CreateDrawingSurface(nsRect *aBounds, PRUi
if (surf)
{
NS_ADDREF(surf);
surf->Init(mSurface->GetGC(), aBounds->width, aBounds->height, aSurfFlags);
PhGC_t *gc = mSurface->GetGC();
surf->Init(gc, aBounds->width, aBounds->height, aSurfFlags);
}
else
{

Просмотреть файл

@ -1,6 +1,7 @@
/* PtRawDrawContainer.c - widget source file */
#include "PtRawDrawContainer.h"
#include <stdio.h>
/* prototype declarations */
PtWidgetClass_t *CreateRawDrawContainerClass( void );

Просмотреть файл

@ -106,7 +106,7 @@ EventQueueTokenQueue::~EventQueueTokenQueue()
// are referenced by things that leak, so this assertion goes off a lot.)
if (mHead)
{
int err=PtAppRemoveFd(NULL,mHead->mQueue->GetEventQueueSelectFD());
int err=PtAppRemoveFd(NULL,mHead->mToken);
if (err==-1)
{
printf ("nsAppShell::~EventQueueTokenQueue Run Error calling PtAppRemoveFd\n");

Просмотреть файл

@ -160,11 +160,14 @@ NS_METHOD nsScrollbar::SetPosition (PRUint32 aPos)
{
PtArg_t arg;
#ifdef PHOTON1_ONLY
PtSetArg( &arg, Pt_ARG_SCROLL_POSITION, aPos, 0 );
if( PtSetResources( mWidget, 1, &arg ) == 0 )
{
res = NS_OK;
}
#endif
}
return res;
@ -184,13 +187,14 @@ NS_METHOD nsScrollbar::GetPosition (PRUint32 & aPos)
{
PtArg_t arg;
int *pos;
#ifdef PHOTON1_ONLY
PtSetArg( &arg, Pt_ARG_SCROLL_POSITION, &pos, 0 );
if( PtGetResources( mWidget, 1, &arg ) == 0 )
{
aPos = *pos;
res = NS_OK;
}
#endif
}
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsScrollbar::GetPosition position=<%d>\n", aPos));
@ -325,7 +329,9 @@ NS_METHOD nsScrollbar::SetParameters (PRUint32 aMaxRange, PRUint32 aThumbSize,
PtSetArg( &arg[0], Pt_ARG_MAXIMUM , aMaxRange, 0 );
PtSetArg( &arg[1], Pt_ARG_SLIDER_SIZE , aThumbSize, 0 );
#ifdef PHOTON1_ONLY
PtSetArg( &arg[2], Pt_ARG_SCROLL_POSITION , aPosition, 0 );
#endif
PtSetArg( &arg[3], Pt_ARG_INCREMENT, aLineIncrement, 0 );
if( PtSetResources( mWidget, 4, arg ) == 0 )

Просмотреть файл

@ -907,7 +907,7 @@ NS_METHOD nsWindow::ShowMenuBar( PRBool aShow)
PhDim_t win_dim;
PtWidget_t *menubar;
mMenuBar->GetNativeData( menubar );
mMenuBar->GetNativeData( (void *) menubar );
if( mMenuBarVis )
{