add new task       

Task ID:  1419  Reduce compilation warnings    
 
Created by her123 on 2011-11-17 11:25 AM, 2559 days ago
Project:  Module Code
Category:  Minor
Priority:  medium
Assigned to:  her123  
Status:  re-opened
Apsim Version:7.4
Your Name:Neville
Contact Details:
 
 

show inline images      show change history

 comment 42673 posted by zur003 on 2017-10-10 11:47 AM, 405 days ago 

The following (in YPComponent.cpp) doesn't always return a value:

 

// ------------------------------------------------------------------
// Calculate a cll value
// ------------------------------------------------------------------
double YPComponent::interpFromArray(std::vector<double>& values, const std::string& variableName)
   {
   double rootDepth;
   bool ok = getVariable (rootDepthID, rootDepth, -DBL_MAX, DBL_MAX, true);

   if (!ok)
      throw runtime_error("Cannot find a root_depth variable belonging to any module");

   if (rootDepth == 0.0)
      return 0.0;
   else
      {
      bool DidInterp;
      if (values.size() != Depth.size())
         {
         ostringstream o;
         o << "Size of variable: " << variableName << " is wrong. Size = " << values.size();
         error(o.str().c_str(), true);
         }
      else
      return linear_interp_real (rootDepth, Depth, values, DidInterp);
      }
   }

 comment 42671 posted by her123 on 2017-10-06 10:54 AM, 409 days ago 
Reduce more compiler warnings
 comment 33412 posted by her123 on 2012-01-27 12:30 PM, 2488 days ago 
Plant 1 requires more work. Many warnings that are unnecessary but changes will alter outputs slighlty.
 comment 32993 posted by devoil on 2011-11-24 12:51 PM, 2552 days ago 
fixed in r2090
 comment 32991 posted by devoil on 2011-11-24 11:09 AM, 2552 days ago 
ReadXXX prototypes in ScienceAPI2.f90 are wrong