Skip to content
Tcl Source Code View Ticket
Login

View Ticket

quell compilation warnings

Closed / Out of Date1889431fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 2 years ago
Descriptionplain2008-02-08 06:37:14
Hello,

I'm working on making our code (which uses Tcl extensively) compile cleanly with most GCC warnings enabled and some of the issues reported are coming from tcl/tk headers.

The attached patch fixes the issues encountered from including tcl.h, which includes shadow warnings for 'index' declared on many functions and checking HAVE_DECLSPEC's value without it being set.  The patch just quells the shadow but changing the function signatures to not name the argument index (maybe call it idx) would also work.

The warning flags being cleaned up are as follows:

-W -Wall -Wundef -Wfloat-equal -Wshadow -Wunreachable-code -Winline -Wconversion

Cheers!
Sean
brlcadplain2008-02-08 13:37:16
File Added - 265511: quell.patch
dkfplain2008-02-08 18:52:01
Logged In: YES 
user_id=79902
Originator: NO

Don't use -Wshadow
dkf Ticket [1889431fff]: 2 changes [History diff]2008-02-08 18:52:31
brlcadplain2008-02-22 04:34:08
Logged In: YES 
user_id=785737
Originator: YES

It was never a question of what causes the warnings.  I merely provided our list to show which ones we tested and worked on cleaning.  The -Wshadow flag is desirable for other reasons hence the provided (trivial) patch that quells them.
dkf Ticket [1889431fff]: 7 changes [History diff]2016-08-23 14:01:30
jan.nijtmanswiki2025-04-16 08:12:10

All of the warnings mentioned here, no longer occur. Closing.

Log in (anonymous is fine) to add a comment.

Attachments: