diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-11-10 14:48:20 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-11-10 14:59:24 -0800 |
commit | 0b9c0acd1c871eaf301ad1119493043ef632a996 (patch) | |
tree | 1dade59fd20ee36b660dd44f0dfb32e136864f97 | |
parent | a545f985ac404a771424d08e5ced63e63601c9f5 (diff) |
ScrollByL: move from XtOffset to XtOffsetOf
Clears 13 warnings from clang 13 of the form:
ScrollByL.c:67:6: warning: performing pointer subtraction with a null
pointer has undefined behavior [-Wnull-pointer-subtraction]
CoreOffset(width), XtRImmediate, (caddr_t) 500},
^~~~~~~~~~~~~~~~~
ScrollByL.c:63:27: note: expanded from macro 'CoreOffset'
#define CoreOffset(field) XtOffset(ScrollByLineWidget, core.field)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xman/-/merge_requests/13>
-rw-r--r-- | ScrollByL.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ScrollByL.c b/ScrollByL.c index 18eba96..d52c4ad 100644 --- a/ScrollByL.c +++ b/ScrollByL.c @@ -59,8 +59,8 @@ static char defaultTranslations[] = * ****************************************************************/ -#define Offset(field) XtOffset(ScrollByLineWidget, scroll.field) -#define CoreOffset(field) XtOffset(ScrollByLineWidget, core.field) +#define Offset(field) XtOffsetOf(ScrollByLineRec, scroll.field) +#define CoreOffset(field) XtOffsetOf(ScrollByLineRec, core.field) static XtResource resources[] = { {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension), |