Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2025-04-16
08:12 • Closed ticket [1889431fff]: quell compilation warnings plus 6 other changes artifact: 1af0b9821b user: jan.nijtmans
2016-08-23
14:01 • Ticket [1889431fff]: 7 changes artifact: 862ee003f4 user: dkf
2008-02-22
04:34 • Ticket [1889431fff]: 4 changes artifact: 5128d458e1 user: brlcad
2008-02-08
18:52 • Ticket [1889431fff]: 2 changes artifact: 0e02c4f8d7 user: dkf
18:52 • Ticket [1889431fff]: 4 changes artifact: a78a79ff6c user: dkf
13:37 • Ticket [1889431fff]: 4 changes artifact: eb2a842e22 user: brlcad
13:37 • Add attachment quell.patch to ticket [1889431fff] artifact: dfc9d29250 user: brlcad
06:37 • New ticket [1889431fff] quell compilation warnings. artifact: 21bda92b9e user: brlcad

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: