gujjula / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

Undefined return values of message statements #319

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile core-plot using GCC 4.2
2. CPTextLayer.m contains a statement
-(void) renderAsVectorInContext:(CGContextRef)context
{
...
CGSize shadowOffset = myShadow.shadow; // return value is undefined if myShadow 
is nil (GCC 4.2)
...
}

What is the expected output? What do you see instead?
shadowOffset should be filled with zeroes if myShadow is nil but it contains 
random - undefined - values.

What version of the product are you using? On what operating system?
core-plot 0.4 head iOS 4.3.x GCC 4.2

Please provide any additional information below.

Similar statements can be found at other locations in the library. All these 
statements return undefined values.

Original issue reported on code.google.com by google@skywind.eu on 20 Aug 2011 at 3:17

GoogleCodeExporter commented 9 years ago
The above and the directly following statement and all similar statements in 
core-plot should be replaced with

  if (myShadow == nil)
  {
    shadowOffset.height = 0.0f;
    shadowOffset.width  = 0.0f;
    shadowRadius        = 0.0f;
  }
  else
  {
    shadowOffset = myShadow.shadowOffset;
    shadowRadius = myShadow.shadowBlurRadius;
  }

Hardy

Original comment by google@skywind.eu on 20 Aug 2011 at 3:23

GoogleCodeExporter commented 9 years ago

Original comment by eskr...@mac.com on 20 Aug 2011 at 6:25

GoogleCodeExporter commented 9 years ago
Issue 322 has been merged into this issue.

Original comment by eskr...@mac.com on 21 Aug 2011 at 8:08

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 3e08572380e1.

Original comment by eskr...@mac.com on 26 Aug 2011 at 1:40