diff options
author | Pablo Barciela <[email protected]> | 2019-04-08 21:28:53 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-08-12 16:23:58 +0300 |
commit | 94e6ce34975ede62fe31d9112ef450255ad94f15 (patch) | |
tree | cc398323045dd3074a2a535f2f6df59fd49bb33f /src/core/async-getprop.c | |
parent | d154eaf9027c1fc135ff50c70beed2bc5d7d4a65 (diff) | |
download | marco-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 *)
^~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'src/core/async-getprop.c')
-rw-r--r-- | src/core/async-getprop.c | 2 |
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, |