Article View: news.software.readers
Article #260028Re: How could defining a variable, and not using it, be a problem ?
From: Peter Köhlmann
Date: Mon, 28 Mar 2016 22:50
Date: Mon, 28 Mar 2016 22:50
27 lines
3005 bytes
3005 bytes
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 It takes the Relf idiots of this world to assume that they know better
Technical Details
Message-ID:
<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-mailReferences:
<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>Show Full Headers
Complete Article Headers
Message-ID: <ndcc9d$aq2$1@dont-email.me>
Subject: Re: How could defining a variable, and not using it, be a problem ?
Date: Tue, 29 Mar 2016 00:50:22 +0200
From: Peter Köhlmann <peter-koehlmann@t-online.de>
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>
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: DNLA GmbH
Lines: 26
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8Bit
Injection-Date: Mon, 28 Mar 2016 22:47:09 -0000 (UTC)
Injection-Info: mx02.eternal-september.org; posting-host="0f6954be5793e8e857583fced3df3065";
logging-data="11074"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Bt/8S2iWb6C1xX4wwAERXSrX2PFepyEg="
X-Face: $<~KY{nMrt|(0EivP4`4l9HfN=V-jo;V;$-xaClll+F]>NsUH~FJT?]u)!Y)Yz13M]gU$wLlA[tU-"OoeG#|3Q~X/dureXwbUTt!tB|74IDO[%ZI:)|nzC9a^Ut\Z`aR5tBEbImzK=Y^Ds(T]|%=-tklf*G5<=IEVL`f7-V5G0@M)@."$]Ao8$'fRAuR-+JwY@%Ibm#cJBYmRZ6-_\2Tn~,h5$/3dd|[[Qp+EW=rAp"1"bEL1Cvx*'?Fq\{^+trE;2gLfTgYBIG2tID#~OD>U
Cancel-Lock: sha1:wIySFYiPi4dK9vOlSI8Gw4B1kv0=
X-Received-Body-CRC: 2919890414
X-Received-Bytes: 2983