Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!shelby!polya!shap From: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Newsgroups: comp.lang.c++ Subject: Re: getting rid of---"prog.c": line nnn: warning: var not used Keywords: pedantic, warnings. Message-ID: <9690@polya.Stanford.EDU> Date: 2 Jun 89 23:56:21 GMT References: <115@orchid.warwick.ac.uk> Sender: Jonathan S. Shapiro Reply-To: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Distribution: comp Organization: Stanford University Lines: 22 In article <115@orchid.warwick.ac.uk> csuvt@warwick.ac.uk (Anton Carver (Wands)) writes: >and the warning: >"prog.c": line 4: warning: argc not used > >The solution: > >main ( int, char *argv[] ) >{ > /* do something with argv, but not argc */ >} We have adopted a slightly different solution, which preserves some documentation value: main ( int /* argc */, char *argv[] ) { /* do something with argv, but not argc */ } It achieves the same purpose without loss of any information. Jon