summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-04-08 21:28:53 +0200
committerVictor Kareh <[email protected]>2019-08-12 16:23:58 +0300
commit94e6ce34975ede62fe31d9112ef450255ad94f15 (patch)
treecc398323045dd3074a2a535f2f6df59fd49bb33f
parentd154eaf9027c1fc135ff50c70beed2bc5d7d4a65 (diff)
downloadmarco-94e6ce34975ede62fe31d9112ef450255ad94f15.tar.bz2
marco-94e6ce34975ede62fe31d9112ef450255ad94f15.tar.xz
async-getprop: Fix cast from non-struct type to struct type
Fixes Clang static analyzer warning: core/async-getprop.c:277:11: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption reply = (xGetPropertyReply *) ^~~~~~~~~~~~~~~~~~~~~
-rw-r--r--src/core/async-getprop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/async-getprop.c b/src/core/async-getprop.c
index d968ca2a..41d9c8ae 100644
--- a/src/core/async-getprop.c
+++ b/src/core/async-getprop.c
@@ -274,7 +274,7 @@ async_get_property_handler (Display *dpy,
#endif
/* (kind of a silly as we know sizeof(xGetPropertyReply) == sizeof(xReply)) */
- reply = (xGetPropertyReply *)
+ reply = (xGetPropertyReply *) (void *)
_XGetAsyncReply (dpy, (char *)&replbuf, rep, buf, len,
(SIZEOF (xGetPropertyReply) - bytes_read) >> 2, /* in 32-bit words */
False); /* False means expecting more data to follow,