Re: ANSI-fy of ranlib, ruptime and rdist [patches]

看板DFBSD_submit作者時間21年前 (2004/07/27 15:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串17/20 (看更多)
:Joerg Sonnenberger wrote: :> On Sat, Jul 24, 2004 at 05:42:38AM +0200, Douwe Kiela wrote: :>>* In some cases I find that *rintf() function calls are preceeded by a :>>(void) cast, e.g. (void) printf("blah"); :> :> Remove them. I'm not really sure why there have been introduced in first :> place, but this is IMO anachronistic. : :Various lint checkers complain when return values are ignored. This is :a useful feature for system calls (e.g., not checking to see if stat() :succeeded). For *printf(), though, it's generally a nuisance. : :I'm not sure what the state is of various linters, but I belive that :Gimpel's FlexeLint has options for turning this off on a per-function basis. My personal opinion is that we should not make coding/style decisions based on what linters might complain about, because most linters are really quite out of date. Also, C is not Java. In all the bugs I've ever found, I think ignoring a return value (as the cause of a bug) falls so far down in the noise that it isn't worth worrying about. -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #111WK400 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #111WK400 (DFBSD_submit)