christos@theory.TC.Cornell.EDU (Christos S. Zoulas) (06/30/91)
Hello, I compile most of my code with gcc -Wall. Unfortunately I use either sccs or rcs and I like to keep an sccs or rcs string as: #ifndef lint static char rcsid[] = "$Id$"; #endif Unfortunately there is no way I know of to tell gcc that I know that this variable is not used and I don't care! How do other people avoid this warning? I know that I could say: #ifndef __GNUC__ ... but then the strings are not compiled in the code... I wish that there was a: #pragma notused or something along those lines... christos -- Christos Zoulas | 389 Theory Center, Electrical Engineering, christos@ee.cornell.edu | Cornell University, Ithaca NY 14853. christos@crnlee.bitnet | Phone: (607) 255 0302, Fax: (607) 255 9072
john@iastate.edu (John Hascall) (06/30/91)
christos@theory.TC.Cornell.EDU (Christos S. Zoulas) writes: }I compile most of my code with gcc -Wall. Unfortunately I use either sccs }or rcs and I like to keep an sccs or rcs string as: }#ifndef lint }static char rcsid[] = "$Id$"; }#endif }Unfortunately there is no way I know of to tell gcc that }I know that this variable is not used and I don't care! How do other }people avoid this warning? I know that I could say: Well, how about by using it? Seriously, it's not a bad idea to: a) print it to the logfile upon startup b) have some (obscure) command line flag c) or key sequence display it depending on what kind of program it is. John ------------------------------------------------------------------------------- John Hascall An ill-chosen word is the fool's messenger. Project Vincent Iowa State University Computation Center john@iastate.edu Ames, IA 50011 (515) 294-9551