summaryrefslogtreecommitdiff
path: root/src/Create.c
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2021-06-16 14:33:31 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2021-06-27 18:35:02 +0000
commitdd3e028d2a1bc5daf87865ca1e5e923000186af8 (patch)
tree3d61848d2e92de694ca50addb1b6e1d6c3f0d1df /src/Create.c
parent38e89c8582efc8cd1e49205b5d02a10511738120 (diff)
Cast via intptr_t when converting integers to pointers
I found these by compiling libXt with the CHERI Clang compiler, as it warns about conversions from integer to pointer that do not use intptr_t. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Diffstat (limited to 'src/Create.c')
-rw-r--r--src/Create.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Create.c b/src/Create.c
index 27df827..8131f42 100644
--- a/src/Create.c
+++ b/src/Create.c
@@ -145,8 +145,8 @@ XtInitializeWidgetClass(WidgetClass wc)
Cardinal num_params;
param[0] = wc->core_class.class_name;
- param[1] = (String) wc->core_class.version;
- param[2] = (String) XtVersion;
+ param[1] = (String) (XtIntPtr) wc->core_class.version;
+ param[2] = (String) (XtIntPtr) XtVersion;
if (wc->core_class.version == (11 * 1000 + 5) || /* MIT X11R5 */
wc->core_class.version == (11 * 1000 + 4)) { /* MIT X11R4 */