🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #260030

Re: How could defining a variable, and not using it, be a problem ?

#260030
From: Chris Ahlstrom
Date: Tue, 29 Mar 2016 01:10
32 lines
3108 bytes
Peter Köhlmann wrote this copyrighted missive and expects royalties:

> Chris Ahlstrom wrote:
>
>> Peter Köhlmann wrote this copyrighted missive and expects royalties:
>> 
>>> It is *never* a good idea to use unreferenced variables, and I remove
>>> them always instead of masking the warning
>> 
>> Unfortunately, many "programmers" suffer from a lack of the necessary
>> attention to details.
>
> I never accept a compiler warning by just "ignoring" it. The compiler issues 
> warnings for a reason, and I have to be absolutely certain that it is the 
> compile which is wrong. It extremely rarely is. Most of the time there is 
> some problem in the code. In may current project (nearly 200.000 lines of 
> (real) source code (comments not counted) I have exactly one occurence of 
> compiler warning (and then for the current linux GCC only, not for the 
> windows one and also not for the OSX compiler) where I get a warning which 
> could be ignored. Better is to simply rewrite the code in a fashion where 
> the compiler does not warn, because it was ambiguish from the start
>
> Since I compile my program for linux, windows and OSX (from the same source) 
> I get different kinds of warnings, depending on environment. And I aspire to 
> remove warnings for all of them, not just for the substandard windows 
> compiler

I agree wholeheartedly!

-- 
	A man was reading The Canterbury Tales one Saturday morning, when his
wife asked "What have you got there?"  Replied he, "Just my cup and Chaucer."
Technical Details
Message-ID: <ndckn7$32p$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.advocacy.(1483839).mbox.7z!not-for-mail
References: <3382742e-7219-4aa1-93cd-d43a78cb6760@googlegroups.com> <Jeff-Relf.Me@Mar.27{9.21A.Seattle.2016}> <nd9ru3$751$1@dont-email.me> <ng9ifb57orabua1vr6grldtg8k6m91djvq@4ax.com> <Jeff-Relf.Me@Mar.28{6.17A.Seattle.2016}> <ndc87p$nuh$2@dont-email.me> <Jeff-Relf.Me@Mar.28{2.52P.Seattle.2016}> <ndcaqc$684$1@dont-email.me> <ndcbc3$6od$2@dont-email.me> <ndcc9d$aq2$1@dont-email.me>

Show Full Headers
Complete Article Headers
Message-ID: <ndckn7$32p$1@dont-email.me>
Subject: Re: How could defining a variable, and not using it, be a problem ?
Date: Mon, 28 Mar 2016 21:10:28 -0400
From: Chris Ahlstrom <OFeem1987@teleworm.us>
References: <3382742e-7219-4aa1-93cd-d43a78cb6760@googlegroups.com> <Jeff-Relf.Me@Mar.27{9.21A.Seattle.2016}> <nd9ru3$751$1@dont-email.me> <ng9ifb57orabua1vr6grldtg8k6m91djvq@4ax.com> <Jeff-Relf.Me@Mar.28{6.17A.Seattle.2016}> <ndc87p$nuh$2@dont-email.me> <Jeff-Relf.Me@Mar.28{2.52P.Seattle.2016}> <ndcaqc$684$1@dont-email.me> <ndcbc3$6od$2@dont-email.me> <ndcc9d$aq2$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.advocacy.(1483839).mbox.7z!not-for-mail
Newsgroups: comp.os.linux.advocacy,sci.physics,alt.free.newsservers,news.software.readers
Organization: None
Lines: 32
Reply-To: OFeem1987@teleworm.us
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 29 Mar 2016 01:11:03 -0000 (UTC)
Injection-Info: mx02.eternal-september.org; posting-host="377f40807546ddf7e077997b4c2d824a";
 logging-data="3161"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fJ/wrRSdPhOcYZO2HWwmE"
User-Agent: slrn/1.0.2 (Linux)
X-Mutt: The most widely-used MUA
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
Cancel-Lock: sha1:ePecytQfXi3bBkoMOqViEBJeIXc=
X-Slrn: Why use anything else?
X-Received-Body-CRC: 607130352
X-Received-Bytes: 3156