Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c Subject: Re: Octal Date: Mon, 2 Jan 2017 09:38:21 +1300 Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net 54m7c1rCcbJfXah3FspNrQ+hU3B1TC6daAyIWOpyGR4LFp69aQ Cancel-Lock: sha1:4yh+054b1zrSXYmD3j+CAgVpVv0= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: Xref: csiph.com comp.lang.c:100810 On 01/ 2/17 09:11 AM, Stefan Ram wrote: > Ian Collins writes: >> On 01/ 2/17 08:54 AM, Stefan Ram wrote: >>> Ian Collins writes: >>>> I wonder why C hasn't adopted the simple rule from C++: if a parameter >>>> isn't going to be used, don't give it a name. >>> There's a style checker for C++ in clang, and when I write: >> It should be telling that control reaches end of non-void function... > > I was referring to »clang-tidy« with »-checks=* -Weverything -W -Wall«. Note this is a guideline, not a language standard rule. If you refer to the relevant style guideline (https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions) it includes the note: "Parameter names may be omitted only if the parameter is unused and its purpose is obvious." So clang-tidy is being over zealous. -- Ian