summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-22 13:03:14 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-22 13:03:14 -0700
commit41975db12f73a6f23d111c3e31b4f3a14ea88b68 (patch)
tree43065411964c59e3604b894bffad719e221203cb
parent4265e8b5e6d363b5bef1fb217012eb4aee65a0cd (diff)
Resolve clang -Wshorten-64-to-32 warnings
xlsatoms.c:175:13: warning: implicit conversion loses integer precision: 'long long' to 'xcb_atom_t' (aka 'unsigned int') [-Wshorten-64-to-32] *atom = value; ~ ^~~~~ xlsatoms.c:244:37: warning: implicit conversion loses integer precision: 'long' to 'xcb_atom_t' (aka 'unsigned int') [-Wshorten-64-to-32] cookie[i] = xcb_get_atom_name(c, i + low); ~~~~~~~~~~~~~~~~~ ~~^~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xlsatoms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlsatoms.c b/xlsatoms.c
index 3fe9eb7..6c7f4b5 100644
--- a/xlsatoms.c
+++ b/xlsatoms.c
@@ -172,7 +172,7 @@ strtoatom(char *s, xcb_atom_t *atom)
return 1;
}
- *atom = value;
+ *atom = (xcb_atom_t) value;
return 0;
}
@@ -241,7 +241,7 @@ say_batch(xcb_connection_t *c, const char *format, xcb_get_atom_name_cookie_t *c
int done = 0;
for (i = 0; i < count; i++)
- cookie[i] = xcb_get_atom_name(c, i + low);
+ cookie[i] = xcb_get_atom_name(c, (xcb_atom_t)i + low);
for (i = 0; i < count; i++) {
xcb_get_atom_name_reply_t *r;