Tcl Source Code

View Ticket
Login
Ticket UUID: 947564
Title: tclThreadAlloc.c warnings
Type: Bug Version: obsolete: 8.5a2
Submitter: dkf Created on: 2004-05-04 09:51:41
Subsystem: 41. Memory Allocation Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-05-05 03:16:44
Resolution: Fixed Closed By: dgp
    Closed on: 2004-05-04 20:16:44
Description:
The following warnings were generated when compiling
tclThreadAlloc.c with gcc 3.2.2 under Linux (RH9/*86);
it looks like a few declarations are missing.

../generic/tclThreadAlloc.c: In function `GetCache':
../generic/tclThreadAlloc.c:187: warning: implicit
declaration of function `TclpNewAllocMutex'
../generic/tclThreadAlloc.c:187: warning: assignment
makes pointer from integer without a cast
../generic/tclThreadAlloc.c:188: warning: assignment
makes pointer from integer without a cast
../generic/tclThreadAlloc.c:190: warning: assignment
makes pointer from integer without a cast
../generic/tclThreadAlloc.c:200: warning: implicit
declaration of function `TclpGetAllocCache'
../generic/tclThreadAlloc.c:200: warning: assignment
makes pointer from integer without a cast
../generic/tclThreadAlloc.c:211: warning: implicit
declaration of function `TclpSetAllocCache'
../generic/tclThreadAlloc.c: In function `TclpAlloc':
../generic/tclThreadAlloc.c:295: warning:
initialization makes pointer from integer without a cast
../generic/tclThreadAlloc.c: In function `TclpFree':
../generic/tclThreadAlloc.c:363: warning:
initialization makes pointer from integer without a cast
../generic/tclThreadAlloc.c: In function `TclpRealloc':
../generic/tclThreadAlloc.c:418: warning:
initialization makes pointer from integer without a cast
../generic/tclThreadAlloc.c: In function
`TclThreadAllocObj':
../generic/tclThreadAlloc.c:502: warning:
initialization makes pointer from integer without a cast
../generic/tclThreadAlloc.c: In function
`TclThreadFreeObj':
../generic/tclThreadAlloc.c:571: warning:
initialization makes pointer from integer without a cast
User Comments: dgp added on 2004-05-05 03:16:44:
Logged In: YES 
user_id=80530

committed to HEAD (8.5a2)

Note: this change should also
suppress the "empty compilation unit"
warnings offered by some compilers.

dgp added on 2004-05-04 22:42:06:

File Deleted - 86054: 



File Added - 86060: 947564.patch

dgp added on 2004-05-04 22:42:05:
Logged In: YES 
user_id=80530

corrected patch that actually works.

dgp added on 2004-05-04 22:23:34:
Logged In: YES 
user_id=80530

spoke too soon.  that patch
leaves TclpRealloc, TclpAlloc
and TclpFree undefined.

dgp added on 2004-05-04 22:19:05:

File Added - 86054: 947564.patch

Logged In: YES 
user_id=80530

this patch corrects the problem here.

dkf added on 2004-05-04 22:02:35:
Logged In: YES 
user_id=79902

configure options were: --enable-threads --enable-symbols=all

This forces the building of tclThreadAlloc.c without
actually using the code inside it, and the code inside it
requires a declaration that's only made when TCL_MEM_DEBUG
is undefined (and TCL_THREADS and USE_THREAD_ALLOC are
defined, but they seem correct.)

dgp added on 2004-05-04 21:40:48:
Logged In: YES 
user_id=80530


my 2004-04-30 commit should have
corrected this.  (see 945447)

Attachments: