Hello there, I just tried to compile X11R6.8.1 with the most excellent Intel C 8.1 compiler, on a Linux Fedora Core 3 box. The compiler said PsText.c(527): remark #592: variable "pPixmap" is used before its value is set The source code is in file programs/Xserver/Xprint/ps/PsText.c The source code is (*pDrawable->pScreen->DestroyPixmap)(pPixmap); Suggest init pPixmap before first use.
Looking at the code: -- snip -- void PsPolyGlyphBlt( DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr *pCharInfo, pointer pGlyphBase) { int width, height; PixmapPtr pPixmap; int nbyLine; /* bytes per line of padded pixmap */ FontPtr pfont; GCPtr pGCtmp; register int i; register int j; unsigned char *pbits; /* buffer for PutImage */ register unsigned char *pb; /* temp pointer into buffer */ register CharInfoPtr pci; /* currect char info */ register unsigned char *pglyph; /* pointer bits in glyph */ int gWidth, gHeight; /* width and height of glyph */ register int nbyGlyphWidth; /* bytes per scanline of glyph */ int nbyPadGlyph; /* server padded line of glyph */ int w, tmpx; XID gcvals[3]; pfont = pGC->font; width = FONTMAXBOUNDS(pfont,rightSideBearing) - FONTMINBOUNDS(pfont,leftSideBearing); height = FONTMAXBOUNDS(pfont,ascent) + FONTMAXBOUNDS(pfont,descent); if ((width == 0) || (height == 0) ) return; { int i; w = 0; for (i=0; i < nGlyphs; i++) w += pCharInfo[i]->metrics.characterWidth; } pGCtmp = GetScratchGC(1, pDrawable->pScreen); if (!pGCtmp) { (*pDrawable->pScreen->DestroyPixmap)(pPixmap); return; } [snip] -- snip -- It seems that the whole statement |(*pDrawable->pScreen->DestroyPixmap)(pPixmap);| can be removed (same applies to the |PsDestroyPixmap(pPixmap);| statement later in the code) ... Jay: Just curious: For what purpose was the |pPixmap| being used ?
Closing WONTFIX because nobody cares about Xprint. Reopen if you plan to address this bug.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.