Skip to content

TextWidget: use labs() instead of abs() on value with long type

Alan Coopersmith requested to merge alanc/libxaw3d:gcc-warnings into master

Found by gcc 14.1:

Text.c:1363:7: warning: absolute value function ‘abs’ given an argument of
 type ‘long int’ but has parameter of type ‘int’ which may cause truncation
 of value [-Wabsolute-value]
 1363 |   if (abs(move) < (int)ctx->core.width) {
      |       ^~~

Signed-off-by: Alan Coopersmith

Merge request reports