summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-10-05 01:26:09 (GMT)
committerhobbs <hobbs>2004-10-05 01:26:09 (GMT)
commitbdbbd44f5ecfdef44242a059886d3ee31a840af3 (patch)
tree6fcd2c267e54c7505fd79612b8f41ec6c7cd7e53
parent0ad6f30a4743fdc26a62d4c0c8d677519f85b8c7 (diff)
downloadtk-bdbbd44f5ecfdef44242a059886d3ee31a840af3.zip
tk-bdbbd44f5ecfdef44242a059886d3ee31a840af3.tar.gz
tk-bdbbd44f5ecfdef44242a059886d3ee31a840af3.tar.bz2
fix init warnings
-rw-r--r--ChangeLog10
-rw-r--r--generic/tkTextIndex.c4
-rw-r--r--generic/tkTextMark.c4
-rw-r--r--generic/tkTextTag.c4
-rw-r--r--generic/tkTextWind.c3
-rw-r--r--generic/tkUndo.c12
6 files changed, 22 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index ec89021..b34b611 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2004-10-04 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tkTextWind.c (EmbWinDelayedUnmap): Fix init warnings
+ * generic/tkTextTag.c (TkTextCreateTag):
+ * generic/tkTextMark.c (TkTextSetMark):
+ * generic/tkTextIndex.c (GetIndex):
+ * generic/tkUndo.c (EvaluateActionList):
+
2004-09-24 Don Porter <dgp@users.sourceforge.net>
- * generic/tkCursor.c: Add missing initialization in debug routine.
+ * generic/tkCursor.c: Add missing initialization in debug routine.
2004-09-24 Vince Darley <vincentdarley@users.sourceforge.net>
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index b405880..ed52e98 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextIndex.c,v 1.19 2004/09/10 12:13:42 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextIndex.c,v 1.20 2004/10/05 01:26:10 hobbs Exp $
*/
#include "default.h"
@@ -731,7 +731,6 @@ GetIndex(interp, sharedPtr, textPtr, string, indexPtr, canCachePtr)
* we can cache the index (or NULL) */
{
char *p, *end, *endOfBase;
- Tcl_HashEntry *hPtr;
TkTextIndex first, last;
int wantLast, result;
char c;
@@ -777,6 +776,7 @@ GetIndex(interp, sharedPtr, textPtr, string, indexPtr, canCachePtr)
if (p != NULL) {
TkTextSearch search;
TkTextTag *tagPtr;
+ Tcl_HashEntry *hPtr = NULL;
CONST char *tagName;
if ((p[1] == 'f') && (strncmp(p+1, "first", 5) == 0)) {
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c
index a536f6c..234ccd7 100644
--- a/generic/tkTextMark.c
+++ b/generic/tkTextMark.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextMark.c,v 1.12 2004/09/10 12:13:42 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextMark.c,v 1.13 2004/10/05 01:26:10 hobbs Exp $
*/
#include "tkInt.h"
@@ -265,7 +265,7 @@ TkTextSetMark(textPtr, name, indexPtr)
CONST char *name; /* Name of mark to set. */
TkTextIndex *indexPtr; /* Where to set mark. */
{
- Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr = NULL;
TkTextSegment *markPtr;
TkTextIndex insertIndex;
int new;
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index 41e61b1..eb09566 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextTag.c,v 1.18 2004/09/10 12:13:42 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextTag.c,v 1.19 2004/10/05 01:26:10 hobbs Exp $
*/
#include "default.h"
@@ -920,7 +920,7 @@ TkTextCreateTag(textPtr, tagName, newTag)
* or 0 if already exists. */
{
register TkTextTag *tagPtr;
- Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr = NULL;
int new;
CONST char *name;
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index 5fd56e0..95dcf03 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextWind.c,v 1.13 2004/09/10 12:13:42 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextWind.c,v 1.14 2004/10/05 01:26:10 hobbs Exp $
*/
#include "tk.h"
@@ -1306,7 +1306,6 @@ EmbWinDelayedUnmap(clientData)
* be unmapped. */
{
TkTextEmbWindowClient *client = (TkTextEmbWindowClient*) clientData;
- TkTextSegment *ewPtr = client->parent;
if (!client->displayed && (client->tkwin != NULL)) {
if (client->textPtr->tkwin != Tk_Parent(client->tkwin)) {
diff --git a/generic/tkUndo.c b/generic/tkUndo.c
index 881bf28..0ddbdc5 100644
--- a/generic/tkUndo.c
+++ b/generic/tkUndo.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUndo.c,v 1.5 2004/09/10 12:13:42 vincentdarley Exp $
+ * RCS: @(#) $Id: tkUndo.c,v 1.6 2004/10/05 01:26:10 hobbs Exp $
*/
#include "tkUndo.h"
@@ -642,21 +642,21 @@ TkUndoApply(stack)
*----------------------------------------------------------------------
*/
-static int
+static int
EvaluateActionList(interp, action)
Tcl_Interp *interp; /* Interpreter to evaluate the action in. */
TkUndoSubAtom *action; /* Head of linked list of action steps
* to perform. */
{
- int result;
-
+ int result = TCL_OK;
+
while (action != NULL) {
if (action->funcPtr != NULL) {
- result = (*action->funcPtr)(interp, action->clientData,
+ result = (*action->funcPtr)(interp, action->clientData,
action->action);
} else if (action->command != NULL) {
Tcl_Obj *cmdNameObj, *evalObj;
-
+
cmdNameObj = Tcl_NewObj();
evalObj = Tcl_NewObj();
Tcl_IncrRefCount(evalObj);