[PATCH xf86-video-nested v4 01/11] Fix compilation warnings.
Laércio de Sousa
laerciosousa at sme-mogidascruzes.sp.gov.br
Fri Nov 13 10:28:01 PST 2015
Signed-off-by: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
---
src/client.h | 19 ++++++++++---------
src/driver.c | 19 ++++++++++---------
src/xlibclient.c | 5 +++--
3 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/src/client.h b/src/client.h
index 4c73b3c..a066ea8 100644
--- a/src/client.h
+++ b/src/client.h
@@ -27,6 +27,7 @@
* Colin Hill <colin.james.hill at gmail.com>
* Weseung Hwang <weseung at gmail.com>
* Nathaniel Way <nathanielcw at hotmail.com>
+ * Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
*/
#include <colormap.h>
@@ -38,18 +39,18 @@
struct NestedClientPrivate;
typedef struct NestedClientPrivate *NestedClientPrivatePtr;
-Bool NestedClientCheckDisplay(char *displayName);
+Bool NestedClientCheckDisplay(const char *displayName);
Bool NestedClientValidDepth(int depth);
-NestedClientPrivatePtr NestedClientCreateScreen(int scrnIndex,
- char *displayName,
- int width,
- int height,
- int originX,
- int originY,
- int depth,
- int bitsPerPixel,
+NestedClientPrivatePtr NestedClientCreateScreen(int scrnIndex,
+ const char *displayName,
+ int width,
+ int height,
+ int originX,
+ int originY,
+ int depth,
+ int bitsPerPixel,
Pixel *retRedMask,
Pixel *retGreenMask,
Pixel *retBlueMask);
diff --git a/src/driver.c b/src/driver.c
index 68b7aa8..2cedee0 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -27,6 +27,7 @@
* Colin Hill <colin.james.hill at gmail.com>
* Weseung Hwang <weseung at gmail.com>
* Nathaniel Way <nathanielcw at hotmail.com>
+ * Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
*/
#include <stdlib.h>
@@ -162,16 +163,16 @@ _X_EXPORT XF86ModuleData nestedModuleData = {
/* These stuff should be valid to all server generations */
typedef struct NestedPrivate {
- char *displayName;
- int originX;
- int originY;
- NestedClientPrivatePtr clientData;
+ const char *displayName;
+ int originX;
+ int originY;
+ NestedClientPrivatePtr clientData;
CreateScreenResourcesProcPtr CreateScreenResources;
- CloseScreenProcPtr CloseScreen;
- ShadowUpdateProc update;
+ CloseScreenProcPtr CloseScreen;
+ ShadowUpdateProc update;
} NestedPrivate, *NestedPrivatePtr;
-#define PNESTED(p) ((NestedPrivatePtr)((p)->driverPrivate))
+#define PNESTED(p) ((NestedPrivatePtr)((p)->driverPrivate))
#define PCLIENTDATA(p) (PNESTED(p)->clientData)
/*static ScrnInfoPtr NESTEDScrn;*/
@@ -303,7 +304,7 @@ static void NestedFreePrivate(ScrnInfoPtr pScrn) {
/* Data from here is valid to all server generations */
static Bool NestedPreInit(ScrnInfoPtr pScrn, int flags) {
NestedPrivatePtr pNested;
- char *originString = NULL;
+ const char *originString = NULL;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NestedPreInit\n");
@@ -504,7 +505,7 @@ NestedAddMode(ScrnInfoPtr pScrn, int width, int height) {
len = strlen(nameBuf);
mode->name = XNFalloc(len+1);
- strcpy(mode->name, nameBuf);
+ strcpy((char *)mode->name, nameBuf);
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Adding mode %s\n", mode->name);
diff --git a/src/xlibclient.c b/src/xlibclient.c
index f7fe652..a1fa39a 100644
--- a/src/xlibclient.c
+++ b/src/xlibclient.c
@@ -27,6 +27,7 @@
* Colin Hill <colin.james.hill at gmail.com>
* Weseung Hwang <weseung at gmail.com>
* Nathaniel Way <nathanielcw at hotmail.com>
+ * Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
*/
#include <stdlib.h>
@@ -78,7 +79,7 @@ struct NestedClientPrivate {
/* Checks if a display is open */
Bool
-NestedClientCheckDisplay(char *displayName) {
+NestedClientCheckDisplay(const char *displayName) {
Display *d;
d = XOpenDisplay(displayName);
@@ -159,7 +160,7 @@ NestedClientTryXShm(NestedClientPrivatePtr pPriv, int scrnIndex, int width, int
NestedClientPrivatePtr
NestedClientCreateScreen(int scrnIndex,
- char *displayName,
+ const char *displayName,
int width,
int height,
int originX,
--
2.1.4
More information about the xorg-devel
mailing list