[Ftnpl-develop] pkt2txt: unused variables
Brought to you by:
jame
|
From: Robert J. C. <rj...@ho...> - 2001-08-26 17:06:53
|
Russ,
> I need to figure out what I want to do with those four variables that are
> only used once. There's really nothing I want to do with them at this
> point. They're unused for the most part.
You're referring to the $PKTvar, $attrib, $c, & $progid2?
For the first two, $PKTvar & $attrib in the newmsgs subroutine, I just
put in a couple of lines that "drop" the variables right after they're
used... They're needed in that unpack statement, so we can't get rid of
them altogether; but you're right, they're otherwise not being used at the
momemt. Doing the drop takes care of the warning about them being used
only once without affecting the unpack statement.
That variable $c is also in the newsmsgs subroutine (& I just noticed
this; shouldn't that be newmsgs? "new", not "news"> <g>) & is not used at
all... Just take it out of that 'local statement? I didn't change that
because I'm not sure what it might have been originally for...
The $progid2 variable is in the logmsg subroutine; it's looks like
it's part of where it's setting up a logfile name apparantly based on the
script name... What I recommend for that is that that part of the
subroutine be dropped altogether & a command line option added to define a
log file name & path, with a default of something like "pkt2txt.log" in the
current directory...
I've updated cvs with the changes for the first two.
Jame
|