summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--unix/tclLoadAout.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 45f5f82..35446c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-16 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * unix/tclLoadAout.c (TclGuessPackageName): removed unused vars
+ and fixed warnings. [Bug #446622] (lim)
+
2001-10-15 Miguel Sofer <msofer@users.sourceforge.net>
* generic/tclProc.c: changing a memcmp to strncmp to avoid a memory
diff --git a/unix/tclLoadAout.c b/unix/tclLoadAout.c
index 4e6a196..e78158d 100644
--- a/unix/tclLoadAout.c
+++ b/unix/tclLoadAout.c
@@ -14,7 +14,7 @@
* and Design Engineering (MADE) Initiative through ARPA contract
* F33615-94-C-4400.
*
- * RCS: @(#) $Id: tclLoadAout.c,v 1.7 2001/09/28 01:21:53 dgp Exp $
+ * RCS: @(#) $Id: tclLoadAout.c,v 1.8 2001/10/16 21:13:50 hobbs Exp $
*/
#include "tclInt.h"
@@ -22,6 +22,11 @@
#ifdef HAVE_EXEC_AOUT_H
# include <sys/exec_aout.h>
#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#else
+# include "../compat/unistd.h"
+#endif
/*
* Some systems describe the a.out header in sys/exec.h, and some in
@@ -336,7 +341,7 @@ FindLibraries (interp, fileName, buf)
Tcl_DString * buf; /* Buffer where the -l an -L flags */
{
FILE * f; /* The load module */
- int c; /* Byte from the load module */
+ int c = 0; /* Byte from the load module */
char * p;
Tcl_DString ds;
CONST char *native;
@@ -475,9 +480,8 @@ TclGuessPackageName(fileName, bufPtr)
* package name to this if possible. */
{
char *p, *q, *r;
- int srcOff, dstOff;
- if (q = strrchr(fileName,'/')) {
+ if ((q = strrchr(fileName,'/'))) {
q++;
} else {
q = fileName;