Skip to content

Commit de2a376

Browse files
committed
Fixing warning in tb_edge_detector.cpp
src/tb_edge_detector.cpp: In function ‘int sc_main(int, char**)’: src/tb_edge_detector.cpp:257:19: warning: operation on ‘localResult’ may be undefined [-Wsequence-point] 257 | localResult = localResult = (int)sqrt((float)(pow((int)localGradientX, 2)) + (float)(pow((int)localGradientY, 2)));
1 parent f7573fd commit de2a376

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/edge-detector/src/tb_edge_detector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ int sc_main(int, char*[])
254254
localGradientY[m] = data.read()[m + 16];
255255
}
256256

257-
localResult = localResult = (int)sqrt((float)(pow((int)localGradientX, 2)) + (float)(pow((int)localGradientY, 2)));
257+
localResult = (int)sqrt((float)(pow((int)localGradientX, 2)) + (float)(pow((int)localGradientY, 2)));
258258
#endif // EDGE_DETECTOR_AT_EN
259259
#ifndef EDGE_DETECTOR_AT_EN
260260
#ifdef EDGE_DETECTOR_LT_EN

0 commit comments

Comments
 (0)