From c9cac4d3009ac9941902d4539c7ef6e0971fadac Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 16 Oct 2001 21:13:50 +0000 Subject: * unix/tclLoadAout.c (TclGuessPackageName): removed unused vars and fixed warnings. [Bug #446622] (lim) --- ChangeLog | 5 +++++ unix/tclLoadAout.c | 12 ++++++++---- 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 + + * unix/tclLoadAout.c (TclGuessPackageName): removed unused vars + and fixed warnings. [Bug #446622] (lim) + 2001-10-15 Miguel Sofer * 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 #endif +#ifdef HAVE_UNISTD_H +# include +#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; -- cgit v0.12