summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-10-16 21:13:50 (GMT)
committerhobbs <hobbs>2001-10-16 21:13:50 (GMT)
commit09c2d5f838c1c7b9249771e301936f7fc71ca5dd (patch)
tree63eedae95ae0070120a21cccb6fb58524cf31abb /unix
parenta6aca92723218392fb1a725dbe9fdbe5e9f4bd86 (diff)
downloadtcl-09c2d5f838c1c7b9249771e301936f7fc71ca5dd.zip
tcl-09c2d5f838c1c7b9249771e301936f7fc71ca5dd.tar.gz
tcl-09c2d5f838c1c7b9249771e301936f7fc71ca5dd.tar.bz2
* unix/tclLoadAout.c (TclGuessPackageName): removed unused vars
and fixed warnings. [Bug #446622] (lim)
Diffstat (limited to 'unix')
-rw-r--r--unix/tclLoadAout.c12
1 files changed, 8 insertions, 4 deletions
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;