On Mon, 29 Oct 2012 10:09:34 +0200 Tom Hacohen <[email protected]> wrote:

> On 29/10/12 10:03, David Seikel wrote:
> > On Mon, 29 Oct 2012 16:03:49 +0900 (KST) ChunEon Park
> > <[email protected]> wrote:
> > 
> >> Ahhhhhhhhhhh yes. you're right.
> >>
> >> Any suggestion?
> > 
> > Er, put up with the warnings?  It's complaining about precisely what
> > you want to do, and precisely what you want to do is not causing any
> > actual problems.  So the warnings are useless.
> 
> Yes, exactly. I've said this before, we shouldn't just randomly "fix"
> warnings. People should only fix warnings properly. The reason we use
> warnings
> in the first place is because we want to be warned, it's not a game we
> play of just suppressing warnings, we are supposed to react to them.
> As Vincent said, you replaced one warning with another, so this
> specifically doesn't help at all, if you'd really wanted to suppressed
> this warning you should have just casted the result to void, but again
> do *not* do it, as these warnings are good and point to issues that
> should be fixed.
> 
> > In fact, you bloated the code by adding a variable, and assigning to
> > that variable, that is only needed to get around the warnings that
> > mean nothing.  Next you'll be adding code to multiply the result by
> > zero, so you can add that to something that IS used without causing
> > problems. Just to get rid of silly little warnings.  So by trying
> > to get rid of the useless warnings, you make worse code.
> > 
> > Compiler writers are not perfect gods that know The One Twue Way of
> > writing code.  Sometimes you just have to ignore their warnings, coz
> > they are not useful warnings.  Just look at the amount of warnings
> > you get actually compiling gcc.
> > 
> > Trying to nail down every little bloody warning, when you have
> > asked to see them all in their pedantic uselessness is just anal.
> > There's better and more fun things to do.
> > 
> > The code writer knows better than the compiler.  After all, if the
> > compiler actually knew better, it would write all the damn code for
> > us.  Then we could al just relax over a few beers and watch the
> > computers do all the work.
> 
> Here we disagree, warnings are a very useful tool, and having a lot of
> them will make their usage inefficient/impossible. We should fix
> warnings, but in a proper way. Here for example, we should actually
> check the return values...

I'm not saying that all warnings are useless, just that some of them
are.  True, if there are a LOT of warnings, making some of the pedantic
useless ones go away might actually be an overall good, but only so
the warnings you really should worry about become more obvious.

For example, the one and only one warning in the edje Lua 2 code is
entirely useless.  The code is perfectly correct, the thing being
warned about will NEVER EVER be a problem, and there's only one warning,
so no real need to get rid of it simply coz it might drown out other
more useful warnings.  There are no other warnings.  And yes, I did
indeed study that particular warning in detail to come to this
conclusion.  It's warning about something that the compiler thinks may
be a problem, but is not really a problem.  That's why they are
warnings.  The programmer may indeed actually know what they are doing
and just put up with the warning.  And note that you have to ask for
all the pedantic little warnings to be turned on to ever see that
warning.

However, if in this evas case, it's actually important to deal with the
return value, and not just to shut up the warning, but coz it's the
right thing to do, then yes, do the right thing, fix the code.

What I'm saying is don't just patch up the warnings coz they are
warnings.  So in this regard, we agree, warnings should be thought
about, but sometimes warnings have to be ignored, after careful
thought.  Documenting them helps to if you decide to ignore them.

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to