Possible loss of data due to type conversion bug?

 

The next very simple piece of code...

// Get chart dimensions
int chart_height = ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS, 0);

 .. produces a beautiful compiler warning.. :

possible loss of data due to type conversion Nique - BO5M.mq4 64 22

Is this a bug?
 
ChartGetInteger() returns a "long", not an "int".
 
Then they need to fix this doc:
Example:
void OnStart()
  {
   int height=ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,0);
   int width=ChartGetInteger(0,CHART_WIDTH_IN_PIXELS,0);
   Print("CHART_HEIGHT_IN_PIXELS =",height,"pixels");
   Print("CHART_WIDTH_IN_PIXELS =",width,"pixels");
  }
https://docs.mql4.com/chart_operations/chartgetinteger
 
The docs are correct! It is just the example that is outdated for "strict" compilation, although probably still valid for the old style of non-strict compilation.
Reason: