Skip to content

TextPop: do arithmetic before casting to pointer, not after

Alan Coopersmith requested to merge alanc/libxaw:clang into master

Clears warning from clang 13.0.1:

TextPop.c:679:64: warning: arithmetic on a null pointer treated as a cast
 from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
    XtSetArg(args[num_args], XtNradioData, (XPointer)XawsdLeft + R_OFFSET);
                                           ~~~~~~~~~~~~~~~~~~~ ^

Signed-off-by: Alan Coopersmith alan.coopersmith@oracle.com

Merge request reports

Loading