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"<[email protected]> > > 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 > <no-reply>@enlightenment.org> wrote: > > Log: > > evas/cserve2 - removed warnings > > > > > > > > Author: hermet > > Date: 2012-10-28 18:33:58 -0700 (Sun, 28 Oct 2012) > > New Revision: 78597 > > Trac: http://trac.enlightenment.org/e/changeset/78597 > > > > Modified: > > trunk/evas/src/bin/evas_cserve2_slaves.c > > > > Modified: trunk/evas/src/bin/evas_cserve2_slaves.c > > > =================================================================== > > --- trunk/evas/src/bin/evas_cserve2_slaves.c 2012-10-29 > 01:22:10 UTC (rev 78596) > +++ > trunk/evas/src/bin/evas_cserve2_slaves.c 2012-10-29 01:33:58 UTC > (rev 78597) > @@ -320,6 +320,7 @@ > _slave_proc_path_get(const > char *name) > { > char buf[PATH_MAX], cwd[PATH_MAX]; > > + char *ret; > > > > if (name[0] == '/') > > { > > @@ -328,7 +329,7 @@ > > return eina_stringshare_add(name); > > } > > > > - getcwd(cwd, sizeof(cwd)); > > + ret = getcwd(cwd, sizeof(cwd)); > > snprintf(buf, sizeof(buf), "%s/%s", cwd, name); > > if (!access(buf, X_OK)) > > return eina_stringshare_add(buf); > > @@ -453,6 +454,7 @@ > > _slave_thread_cb(void *data) > > { > > ssize_t n; > > + int ret; > > Slave_Command cmd; > > > > Slave_Thread_Data *sd = data; > > @@ -475,7 +477,7 @@ > > continue; > > } > > sd->cmdanswer = sd->cb(sd, &cmd, > sd->cmddata, sd->cb_data); > - write(sd->write_fd, > &cmd, sizeof(cmd)); > + ret = write(sd->write_fd, > &cmd, sizeof(cmd)); > > > n = read(sd->read_fd, &cmd, sizeof(cmd)); > > } -- A big old stinking pile of genius that no one wants coz there are too many silver coated monkeys in the world.
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
