diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-19 13:51:24 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-19 14:32:19 -0700 |
commit | 5e66fb64762b6d442a55d0506b07be18aeee7643 (patch) | |
tree | f8a5a74455665f63962c978b1f657a6e0f82b153 /src/XvMC.c | |
parent | 58073bc12d17341cb9459f36caf161256fc8be19 (diff) |
Replace custom copy of GetReq macro with call to Xlib 1.5's _XGetRequest
XvMCproto.h names don't match those required by the Xlibint.h GetReq*
macros, but at least we can rely on the _XGetRequest function for the
bulk of the work now, instead of duplicating it.
Continues to use sizeof() instead of SIZEOF() due to stray ; on the
end of many sz_* definitions in XvMCproto.h, but I've verified the
sizes are the same with both methods.
Also clears clang warnings that were repeated for every call:
XvMC.c:79:5: warning: cast from 'char *' to 'xvmcQueryVersionReq *'
increases required alignment from 1 to 2 [-Wcast-align]
XvMCGetReq(QueryVersion, req);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./XvMClibint.h:16:8: note: expanded from macro 'XvMCGetReq'
req = (xvmc##name##Req *)(dpy->last_req = dpy->bufptr);\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XvMC.c:79:5: warning: implicit conversion loses integer precision:
'int' to 'CARD8' (aka 'unsigned char') [-Wconversion]
XvMCGetReq(QueryVersion, req);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./XvMClibint.h:17:30: note: expanded from macro 'XvMCGetReq'
req->reqType = info->codes->major_opcode;\
~ ~~~~~~~~~~~~~^~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/XvMC.c')
0 files changed, 0 insertions, 0 deletions