diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-02-14 10:14:20 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-02-15 08:27:30 +0100 |
commit | dc85a6da15768f7a9622677e79c618bfb35ce513 (patch) | |
tree | 20128de6331e8f5472068bc7ddba5f4aeac29c9b /src/vmwarevideo.c | |
parent | 98199b4c0aca89b70d4f0a0e37e1e27ac15a23c7 (diff) |
Fix a number of compilation warnings
There are a number of compilation warnings caused by const char pointers
being either explicitly or implicitly cast to char pointers. There
are a number of ABI differences that have hindered this so far, but
make a new attempt using the common_compat.h defines.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Diffstat (limited to 'src/vmwarevideo.c')
-rw-r--r-- | src/vmwarevideo.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/vmwarevideo.c b/src/vmwarevideo.c index 634af69..3ba1dcd 100644 --- a/src/vmwarevideo.c +++ b/src/vmwarevideo.c @@ -44,6 +44,7 @@ #include "fourcc.h" #include "svga_escape.h" #include "svga_overlay.h" +#include "common_compat.h" #include <X11/extensions/Xv.h> @@ -52,6 +53,8 @@ #include <xf86_libc.h> #endif +static CONST_ABI_16_0 char xv_adapt_name[] = "VMWare Overlay Video Engine"; +static CONST_ABI_16_0 char xv_image_name[] = "XV_IMAGE"; #define HAVE_FILLKEYHELPERDRAWABLE \ ((GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 2) || \ @@ -90,7 +93,7 @@ static XF86VideoEncodingRec vmwareVideoEncodings[] = { { 0, - "XV_IMAGE", + xv_image_name, VMWARE_VID_MAX_WIDTH, VMWARE_VID_MAX_HEIGHT, {1, 1} } @@ -111,6 +114,9 @@ static XF86ImageRec vmwareVideoImages[] = XVIMAGE_UYVY }; +static CONST_ABI_16_TO_19 char xv_colorkey_name[] = "XV_COLORKEY"; +static CONST_ABI_16_TO_19 char xv_autopaint_name[] = "XV_AUTOPAINT_COLORKEY"; + #define VMWARE_VID_NUM_ATTRIBUTES 2 static XF86AttributeRec vmwareVideoAttributes[] = { @@ -118,13 +124,13 @@ static XF86AttributeRec vmwareVideoAttributes[] = XvGettable | XvSettable, 0x000000, 0xffffff, - "XV_COLORKEY" + xv_colorkey_name, }, { XvGettable | XvSettable, 0, 1, - "XV_AUTOPAINT_COLORKEY" + xv_autopaint_name, } }; @@ -575,7 +581,7 @@ vmwareVideoSetup(ScrnInfoPtr pScrn) adaptor->type = XvInputMask | XvImageMask | XvWindowMask; adaptor->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; - adaptor->name = "VMware Video Engine"; + adaptor->name = xv_adapt_name; adaptor->nEncodings = VMWARE_VID_NUM_ENCODINGS; adaptor->pEncodings = vmwareVideoEncodings; adaptor->nFormats = VMWARE_VID_NUM_FORMATS; |