OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
791 stars 288 forks source link

d.histogram: Initialize range_dmin and range_dmax to fix uninitialize value warnings in bar.c #3923

Closed ShubhamDesai closed 4 days ago

ShubhamDesai commented 1 week ago

This pull request addresses uninitialized value warnings in the bar.c file.

Fixed Issues: bar.c:221:58: warning: The right operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult] range_dmin + i * (range_dmax - range_dmin) / nsteps;

bar.c:275:58: warning: The right operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult] range_dmin + i * (range_dmax - range_dmin) / nsteps;

bar.c:312:53: warning: The right operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult] dmin = range_dmin + i * (range_dmax - range_dmin) / nsteps;

bar.c:221:58: warning: The left operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult] range_dmin + i * (range_dmax - range_dmin) / nsteps;

bar.c:275:58: warning: The left operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult] range_dmin + i * (range_dmax - range_dmin) / nsteps;

bar.c:312:53: warning: The left operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult] dmin = range_dmin + i * (range_dmax - range_dmin) / nsteps;

Changes Made:

Code Changes