summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-30 18:22:10 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-30 18:22:10 -0200
commitf56a69f2cf7df1e7cdf2494c5408786e53467374 (patch)
treec2b4d72f8bd8af0de6efdccd7ae8e3028c654d08 /src
parentc1f227f94aec6f4555182965fc0d2d8f33fef01f (diff)
Janitor: ansification, make distcheck, compiler warnings, .gitignore.
Most "compiler" warnings were actually sparse warnings, due to assigning a integer to a pointer, or an external symbol without a previous declaration.
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore7
-rw-r--r--src/Composite.c3
-rw-r--r--src/Constraint.c1
-rw-r--r--src/Converters.c6
-rw-r--r--src/Core.c2
-rw-r--r--src/Create.c3
-rw-r--r--src/Display.c4
-rw-r--r--src/Initialize.c2
-rw-r--r--src/Intrinsic.c2
-rw-r--r--src/Keyboard.c2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/NextEvent.c3
-rw-r--r--src/Object.c1
-rw-r--r--src/RectObj.c1
-rw-r--r--src/ResConfig.c1
-rw-r--r--src/Selection.c18
-rw-r--r--src/SetValues.c2
-rw-r--r--src/Shell.c4
-rw-r--r--src/TMparse.c3
19 files changed, 27 insertions, 40 deletions
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index b37a5f8..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-.libs
-libXt.la
-*.lo
-Makefile
-Makefile.in
-StringDefs.c
diff --git a/src/Composite.c b/src/Composite.c
index 7a90975..c5fbf12 100644
--- a/src/Composite.c
+++ b/src/Composite.c
@@ -60,7 +60,6 @@ in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/lib/Xt/Composite.c,v 1.5 2001/08/22 22:52:17 dawes Exp $ */
-#define XT_COMPOSITE
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -71,7 +70,7 @@ static XtResource resources[] = {
{XtNchildren, XtCReadOnly, XtRWidgetList, sizeof(WidgetList),
XtOffsetOf(CompositeRec, composite.children), XtRImmediate, NULL},
{XtNnumChildren, XtCReadOnly, XtRCardinal, sizeof(Cardinal),
- XtOffsetOf(CompositeRec, composite.num_children), XtRImmediate, 0},
+ XtOffsetOf(CompositeRec, composite.num_children), XtRImmediate, NULL},
{XtNinsertPosition, XtCInsertPosition, XtRFunction, sizeof(XtOrderProc),
XtOffsetOf(CompositeRec, composite.insert_position), XtRImmediate, NULL},
};
diff --git a/src/Constraint.c b/src/Constraint.c
index dd9b523..aeb6e38 100644
--- a/src/Constraint.c
+++ b/src/Constraint.c
@@ -60,7 +60,6 @@ in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/lib/Xt/Constraint.c,v 1.2 2001/08/22 22:52:17 dawes Exp $ */
-#define CONSTRAINT
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/src/Converters.c b/src/Converters.c
index acb572e..a1f7f2b 100644
--- a/src/Converters.c
+++ b/src/Converters.c
@@ -487,12 +487,12 @@ Boolean XtCvtStringToPixel(
colormap = *((Colormap *) args[1].addr);
if (CompareISOLatin1(str, XtDefaultBackground) == 0) {
- *closure_ret = False;
+ *closure_ret = NULL;
if (pd->rv) donestr(Pixel, BlackPixelOfScreen(screen), XtRPixel)
else donestr(Pixel, WhitePixelOfScreen(screen), XtRPixel);
}
if (CompareISOLatin1(str, XtDefaultForeground) == 0) {
- *closure_ret = False;
+ *closure_ret = NULL;
if (pd->rv) donestr(Pixel, WhitePixelOfScreen(screen), XtRPixel)
else donestr(Pixel, BlackPixelOfScreen(screen), XtRPixel);
}
@@ -515,7 +515,7 @@ Boolean XtCvtStringToPixel(
XtAppWarningMsg(pd->appContext, type, "cvtStringToPixel",
XtCXtToolkitError, msg, params, &num_params);
- *closure_ret = False;
+ *closure_ret = NULL;
return False;
} else {
*closure_ret = (char*)True;
diff --git a/src/Core.c b/src/Core.c
index d30b493..24b7044 100644
--- a/src/Core.c
+++ b/src/Core.c
@@ -59,8 +59,6 @@ in this Software without prior written authorization from The Open Group.
*/
-#define _XT_CORE_C
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/src/Create.c b/src/Create.c
index d3417a1..ab98c3d 100644
--- a/src/Create.c
+++ b/src/Create.c
@@ -87,8 +87,7 @@ CallClassPartInit(WidgetClass ancestor, WidgetClass wc)
}
void
-XtInitializeWidgetClass(wc)
- WidgetClass wc;
+XtInitializeWidgetClass(WidgetClass wc)
{
XtEnum inited;
LOCK_PROCESS;
diff --git a/src/Display.c b/src/Display.c
index 2812aa8..de57a6b 100644
--- a/src/Display.c
+++ b/src/Display.c
@@ -244,7 +244,7 @@ Display *XtOpenDisplay(
String *argv)
{
Display *d;
- XrmDatabase db = 0;
+ XrmDatabase db = NULL;
XtPerDisplay pd;
String language = NULL;
@@ -357,7 +357,7 @@ XtDisplayInitialize(
)
{
XtPerDisplay pd;
- XrmDatabase db = 0;
+ XrmDatabase db = NULL;
LOCK_APP(app);
pd = InitPerDisplay(dpy, app, name, classname);
diff --git a/src/Initialize.c b/src/Initialize.c
index 84c720e..d2af1b1 100644
--- a/src/Initialize.c
+++ b/src/Initialize.c
@@ -748,7 +748,7 @@ XrmDatabase _XtPreparseCommandLine(
String *displayName,
String *language)
{
- XrmDatabase db = 0;
+ XrmDatabase db = NULL;
XrmOptionDescRec *options;
Cardinal num_options;
XrmName name_list[3];
diff --git a/src/Intrinsic.c b/src/Intrinsic.c
index a86884e..c3b6f5d 100644
--- a/src/Intrinsic.c
+++ b/src/Intrinsic.c
@@ -559,7 +559,7 @@ static Widget SearchChildren(
NameMatchProc matchproc,
int in_depth, int *out_depth, int *found_depth)
{
- Widget w1 = 0, w2;
+ Widget w1 = NULL, w2;
int d1, d2;
if (XtIsComposite(root)) {
diff --git a/src/Keyboard.c b/src/Keyboard.c
index 82bcc24..6c4a62a 100644
--- a/src/Keyboard.c
+++ b/src/Keyboard.c
@@ -737,7 +737,7 @@ static void FocusDestroyCallback(
XtPointer closure, /* Widget */
XtPointer call_data)
{
- XtSetKeyboardFocus((Widget)closure, None);
+ XtSetKeyboardFocus((Widget)closure, NULL);
}
void XtSetKeyboardFocus(
diff --git a/src/Makefile.am b/src/Makefile.am
index 5127b42..4a818ad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ CLEANFILES = $(BUILT_SOURCES)
SRCH_DEFINES = -DXFILESEARCHPATHDEFAULT=\"$(XFILESEARCHPATHDEFAULT)\"
ERRORDB_DEFINES = -DERRORDB=\"$(libdir)/X11/XtErrorDB\"
-AM_CFLAGS = $(XT_CFLAGS) $(X11_CFLAGS) $(SRCH_DEFINES) $(ERRORDB_DEFINES) \
+AM_CFLAGS = $(XT_CFLAGS) $(SRCH_DEFINES) $(ERRORDB_DEFINES) \
$(XTMALLOC_ZERO_CFLAGS)
INCLUDES = -I$(top_srcdir)/include/ -I$(top_srcdir)/include/X11 \
diff --git a/src/NextEvent.c b/src/NextEvent.c
index bcc00d5..c696af3 100644
--- a/src/NextEvent.c
+++ b/src/NextEvent.c
@@ -579,6 +579,7 @@ int _XtWaitForSomething(
#ifdef USE_POLL
wf.fdlist = NULL;
wf.stack = fdlist;
+ wf.fdlistlen = wf.num_dpys = 0;
#endif
WaitLoop:
@@ -1438,7 +1439,7 @@ XtInputMask XtAppPending(
X_GETTIMEOFDAY (&cur_time);
FIXUP_TIMEVAL(cur_time);
if ((IS_AT_OR_AFTER(app->timerQueue->te_timer_value, cur_time)) &&
- (app->timerQueue->te_proc != 0)) {
+ (app->timerQueue->te_proc != NULL)) {
ret |= XtIMTimer;
}
}
diff --git a/src/Object.c b/src/Object.c
index f762a25..777fd68 100644
--- a/src/Object.c
+++ b/src/Object.c
@@ -60,7 +60,6 @@ in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/lib/Xt/Object.c,v 1.5 2001/01/17 19:43:06 dawes Exp $ */
-#define OBJECT
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/src/RectObj.c b/src/RectObj.c
index 07bbd1f..0835d5b 100644
--- a/src/RectObj.c
+++ b/src/RectObj.c
@@ -48,7 +48,6 @@ SOFTWARE.
******************************************************************/
/* $XFree86: xc/lib/Xt/RectObj.c,v 1.2 2001/08/22 22:52:19 dawes Exp $ */
-#define RECTOBJ
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/src/ResConfig.c b/src/ResConfig.c
index 4c2e736..fd6d057 100644
--- a/src/ResConfig.c
+++ b/src/ResConfig.c
@@ -661,6 +661,7 @@ _get_last_part (
*part = XtNewString (loose);
return ('*');
}
+ *part = NULL;
return ('0'); /* error - return 0 */
}
diff --git a/src/Selection.c b/src/Selection.c
index 46c75f8..aea4914 100644
--- a/src/Selection.c
+++ b/src/Selection.c
@@ -1011,10 +1011,10 @@ Boolean XtOwnSelectionIncremental(
}
-void XtDisownSelection(widget, selection, time)
- Widget widget;
- Atom selection;
- Time time;
+void XtDisownSelection(
+ Widget widget,
+ Atom selection,
+ Time time)
{
Select ctx;
WIDGET_TO_APPCON(widget);
@@ -1972,7 +1972,7 @@ static void CleanupRequest(
}
}
-extern void XtCreateSelectionRequest(
+void XtCreateSelectionRequest(
Widget widget,
Atom selection)
{
@@ -1988,7 +1988,7 @@ extern void XtCreateSelectionRequest(
(void) XFindContext(dpy, window, multipleContext, (XPointer*) &queueInfo);
/* If there is one, then cancel it */
- if (queueInfo != 0)
+ if (queueInfo != NULL)
CleanupRequest(dpy, queueInfo, selection);
else {
/* Create it */
@@ -2013,7 +2013,7 @@ extern void XtCreateSelectionRequest(
UNLOCK_PROCESS;
}
-extern void XtSendSelectionRequest(
+void XtSendSelectionRequest(
Widget widget,
Atom selection,
Time time)
@@ -2098,7 +2098,7 @@ extern void XtSendSelectionRequest(
UNLOCK_PROCESS;
}
-extern void XtCancelSelectionRequest(
+void XtCancelSelectionRequest(
Widget widget,
Atom selection)
{
@@ -2112,7 +2112,7 @@ extern void XtCancelSelectionRequest(
queueInfo = NULL;
(void) XFindContext(dpy, window, multipleContext, (XPointer*) &queueInfo);
/* If there is one, then cancel it */
- if (queueInfo != 0)
+ if (queueInfo != NULL)
CleanupRequest(dpy, queueInfo, selection);
UNLOCK_PROCESS;
}
diff --git a/src/SetValues.c b/src/SetValues.c
index d9e8a46..8695ede 100644
--- a/src/SetValues.c
+++ b/src/SetValues.c
@@ -194,7 +194,7 @@ void XtSetValues(
XtGeometryResult result;
XtWidgetGeometry geoReq, geoReply;
WidgetClass wc;
- ConstraintWidgetClass cwc = 0;
+ ConstraintWidgetClass cwc = NULL;
Boolean hasConstraints;
XtAlmostProc set_values_almost;
XtAppContext app = XtWidgetToApplicationContext(w);
diff --git a/src/Shell.c b/src/Shell.c
index b3e57b8..292777b 100644
--- a/src/Shell.c
+++ b/src/Shell.c
@@ -60,8 +60,6 @@ in this Software without prior written authorization from The Open Group.
*/
-#define SHELL
-
#ifndef DEFAULT_WM_TIMEOUT
#define DEFAULT_WM_TIMEOUT 5000
#endif
@@ -152,7 +150,7 @@ static XtResource shellResources[]=
XtRBoolean, sizeof(Boolean), Offset(shell.override_redirect),
XtRImmediate, (XtPointer)False},
{ XtNvisual, XtCVisual, XtRVisual, sizeof(Visual*),
- Offset(shell.visual), XtRImmediate, CopyFromParent}
+ Offset(shell.visual), XtRImmediate, (XtPointer)CopyFromParent}
};
static void ClassPartInitialize(WidgetClass);
diff --git a/src/TMparse.c b/src/TMparse.c
index 25522fb..43ee8c9 100644
--- a/src/TMparse.c
+++ b/src/TMparse.c
@@ -1533,7 +1533,7 @@ static String ParseEventSeq(
while ( *str != '\0' && !IsNewline(*str)) {
static Event nullEvent =
- {0, 0,0L, 0, 0L, 0L,_XtRegularMatch,FALSE};
+ {0, 0,NULL, 0, 0L, 0L,_XtRegularMatch,FALSE};
EventPtr event;
ScanWhitespace(str);
@@ -1836,6 +1836,7 @@ static String ParseTranslationTableProduction(
ActionPtr *actionsP;
String production = str;
+ actionsP = NULL;
str = ParseEventSeq(str, &eventSeq, &actionsP,error);
if (*error == TRUE) {
ShowProduction(production);