[PATCH:libxmu] Fix missing const qualifier.
Cyril Brulebois
kibi at debian.org
Sat Nov 27 06:55:42 PST 2010
In libX11's c8701115, atom names argument to XInternAtoms were marked as
const.
This fixes the build with CFLAGS="-Wall -Werror":
| CC Atoms.lo
| cc1: warnings being treated as errors
| Atoms.c: In function ‘XmuInternStrings’:
| Atoms.c:150: error: passing argument 2 of ‘XInternAtoms’ from incompatible pointer type
| /home/kibi/xorg-build/include/X11/Xlib.h:1549: note: expected ‘const char **’ but argument is of type ‘char **’
| CC EditresCom.lo
| cc1: warnings being treated as errors
| EditresCom.c: In function ‘_XEditResCheckMessages’:
| EditresCom.c:224: error: passing argument 2 of ‘XInternAtoms’ from incompatible pointer type
| /home/kibi/xorg-build/include/X11/Xlib.h:1549: note: expected ‘const char **’ but argument is of type ‘char **’
Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
src/Atoms.c | 2 +-
src/EditresCom.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Atoms.c b/src/Atoms.c
index 48e2431..b67270b 100644
--- a/src/Atoms.c
+++ b/src/Atoms.c
@@ -147,5 +147,5 @@ void
XmuInternStrings(Display *d, register String *names,
register Cardinal count, register Atom *atoms)
{
- (void) XInternAtoms(d, (char**)names, (int)count, FALSE, atoms);
+ (void) XInternAtoms(d, (const char**)names, (int)count, FALSE, atoms);
}
diff --git a/src/EditresCom.c b/src/EditresCom.c
index 0208cdf..2e5ef41 100644
--- a/src/EditresCom.c
+++ b/src/EditresCom.c
@@ -215,7 +215,7 @@ _XEditResCheckMessages(Widget w, XtPointer data, XEvent *event, Boolean *cont)
if (!first_time)
{
Atom atoms[4];
- static char *names[] = {
+ static const char *names[] = {
EDITRES_NAME, EDITRES_COMMAND_ATOM,
EDITRES_PROTOCOL_ATOM, EDITRES_CLIENT_VALUE
};
--
1.7.2.3
More information about the xorg-devel
mailing list