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.

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.


> From: "Vincent Torri"&lt;[email protected]&gt; 
> 
> it's useless if you don't use the result, and anyway, you'll have
> another warning : "set but unused variable"
> 
> On Mon, Oct 29, 2012 at 2:33 AM, Enlightenment SVN
> &lt;no-reply&gt;@enlightenment.org&gt; wrote:
> &gt; Log:
> &gt; evas/cserve2 - removed warnings
> &gt;
> &gt;
> &gt;
> &gt; Author:       hermet
> &gt; Date:         2012-10-28 18:33:58 -0700 (Sun, 28 Oct 2012)
> &gt; New Revision: 78597
> &gt; Trac:         http://trac.enlightenment.org/e/changeset/78597
> &gt;
> &gt; Modified:
> &gt;   trunk/evas/src/bin/evas_cserve2_slaves.c
> &gt;
> &gt; Modified: trunk/evas/src/bin/evas_cserve2_slaves.c
> &gt;
> ===================================================================
> &gt; --- trunk/evas/src/bin/evas_cserve2_slaves.c    2012-10-29
> 01:22:10 UTC (rev 78596) &gt; +++
> trunk/evas/src/bin/evas_cserve2_slaves.c    2012-10-29 01:33:58 UTC
> (rev 78597) &gt; @@ -320,6 +320,7 @@ &gt;  _slave_proc_path_get(const
> char *name) &gt;  { &gt;     char buf[PATH_MAX], cwd[PATH_MAX];
> &gt; +   char *ret;
> &gt;
> &gt;     if (name[0] == '/')
> &gt;       {
> &gt; @@ -328,7 +329,7 @@
> &gt;          return eina_stringshare_add(name);
> &gt;       }
> &gt;
> &gt; -   getcwd(cwd, sizeof(cwd));
> &gt; +   ret = getcwd(cwd, sizeof(cwd));
> &gt;     snprintf(buf, sizeof(buf), "%s/%s", cwd, name);
> &gt;     if (!access(buf, X_OK))
> &gt;       return eina_stringshare_add(buf);
> &gt; @@ -453,6 +454,7 @@
> &gt;  _slave_thread_cb(void *data)
> &gt;  {
> &gt;     ssize_t n;
> &gt; +   int ret;
> &gt;     Slave_Command cmd;
> &gt;
> &gt;     Slave_Thread_Data *sd = data;
> &gt; @@ -475,7 +477,7 @@
> &gt;               continue;
> &gt;            }
> &gt;          sd-&gt;cmdanswer = sd-&gt;cb(sd, &amp;cmd,
> sd-&gt;cmddata, sd-&gt;cb_data); &gt; -        write(sd-&gt;write_fd,
> &amp;cmd, sizeof(cmd)); &gt; +        ret = write(sd-&gt;write_fd,
> &amp;cmd, sizeof(cmd)); &gt;
> &gt;          n = read(sd-&gt;read_fd, &amp;cmd, sizeof(cmd));
> &gt;       }


-- 
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