Apache OpenOffice (AOO) Bugzilla – Issue 14862
return type mismatch - return by value assigned to reference
Last modified: 2003-06-12 10:39:59 UTC
gcc 3.3 now provides error messages when there are return type mismatches such as when a method returns an object by value that is assigned to a reference which is a bug since the reference points to a temporary variable created to hold the return by value. An occurrence of this type occurred here see ... (fixme?) Please evaluate that line and fix the code in question to prevent the bug if needed. vcl/unx/source/gdi/salgdi2.cxx @@ -573,7 SalPrinterBmp::GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const { Scanline pScan = mpScanAccess + nRow * mnScanOffset; (fixme?)BitmapColor& aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); return ColorOf (aColor); } vcl/unx/source/gdi/salgdi2.cxx @@ -582,7 SalPrinterBmp::GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const { Scanline pScan = mpScanAccess + nRow * mnScanOffset; (fixme?)BitmapColor& aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); return GrayOf (aColor); } vcl/unx/source/gdi/salgdi2.cxx @@ -591,7 SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const { Scanline pScan = mpScanAccess + nRow * mnScanOffset; (fixme?)BitmapColor& aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); if (aColor.IsIndex()) return aColor.GetIndex();
re set prio
cp->pl: indeed seems to be a problem of copying from stack to reference. please have a look. shouldn't harm too much to create a copy since BitmapColor asssigments are all inline.
This is prio 1 exactly why ? And why is the compiler suddenly not more capable of creating the necessary temporary itself as all its predecessors did ?
ok, forget the last comment, i looked at the wrong line. I do not really understand how any compiler was able to grok that.
fixed in CWS vcl11
verified in vcl11
fix is in srx645m5, closing issue