Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
06:52 • Ticket [219117ffff] Invalid pointer definition in generic/tclEnv.c status st... artifact: 92c1cd6a97 user: dgp
2000-10-26
08:34 • Closed ticket [219117ffff]. artifact: 0b5c45360d user: welch
01:11 • New ticket [219117ffff]. artifact: c704c3be2d user: nobody

Invalid pointer definition in generic/tclEnv.c

Closed / Fixed219117ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:11:02
OriginalBugID: 6126 Bug
Version: 8.3.2
SubmitDate: '2000-08-11'
LastModified: '2000-08-11'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: ericm
OS: Digital Unix
OSVersion: v4.0F
Machine: Personal Workstation 433au
FixedDate: '2000-08-11'
FixedInVersion: 8.4a2
ClosedDate: '2000-10-25'


Name:
Kevin S. Partin

ReproducibleScript:
Line 359 in generic/tclEnv.c should be 'int length;', instead of 'unsigned int length'. Current definition of variable length causes compiler to complain with a warning.

ObservedBehavior:
cc -c -O   -I./../generic -I. -DHAVE_TZSET -std1  -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DUSE_FIONBIO=1 -DSTATIC_BUILD=1         -DTCL_SHLIB_EXT=\".so\" ./../generic/tclEnv.c
cc: Warning: ./../generic/tclEnv.c, line 369: In this statement, the referenced type of the pointer value "&length" is "unsigned int", which is not compatible with "int". (ptrmismatch)
    index = TclpFindVariable(name, &length);
-----------------------------------^

DesiredBehavior:
No compiler warning on definition of variable length.

PatchFiles:
generic/tclEnv.c, line 359



Thanks for finding and reporting this error.  I have corrected it and committed the change to the CVS source repository.  The fix will be included in Tcl 8.4a2.

   Eric Melski                            The Other Tcl Guy
   ericm at ajubasolutions.com            Ajuba Solutions

-- 08/11/2000 ericm
welch Closed ticket [219117ffff]. [History diff]2000-10-26 08:34:57
dgp Ticket [219117ffff]: 3 changes [History diff]2001-04-05 06:52:46
Log in (anonymous is fine) to add a comment.