sonar-openedge icon indicating copy to clipboard operation
sonar-openedge copied to clipboard

Conversion could overflow variable

Open stefandrissen opened this issue 2 years ago • 2 comments

A continuation of #1076 - after updating to V2.23 truncate will still flag the rule:

def var i1 as int.
def var i2 as int.

i2 = truncate( i1 / 2, 0 ).

stefandrissen avatar Oct 18 '23 04:10 stefandrissen

Just leaving this here :-)

image

stefandrissen avatar Nov 29 '23 17:11 stefandrissen

That's just in case you change to exp(2, 31) + 1 😄

gquerret avatar Nov 29 '23 18:11 gquerret