From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stanislav Ievlev Newsgroups: gmane.lisp.guile.devel Subject: Re: guile-1.8.1 - problems on AMD64 Date: Mon, 16 Oct 2006 10:25:40 +0400 Message-ID: <20061016062540.GE17598@basalt.office.altlinux.org> References: <20061010063445.GA30335@basalt.office.altlinux.org> <87slhw60l8.fsf@laas.fr> <20061011110153.GA12594@basalt.office.altlinux.org> <87r6xdher1.fsf@laas.fr> <20061013062617.GD8294@basalt.office.altlinux.org> <873b9sfyx6.fsf@laas.fr> <87vemnca65.fsf@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1160979969 29882 80.91.229.2 (16 Oct 2006 06:26:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2006 06:26:09 +0000 (UTC) Cc: guile-devel@gnu.org, ldv@altlinux.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Oct 16 08:26:06 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GZLvB-0004Et-UT for guile-devel@m.gmane.org; Mon, 16 Oct 2006 08:25:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZLvB-0004M6-1s for guile-devel@m.gmane.org; Mon, 16 Oct 2006 02:25:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZLv2-0004Dm-3F for guile-devel@gnu.org; Mon, 16 Oct 2006 02:25:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZLv0-0004An-Ei for guile-devel@gnu.org; Mon, 16 Oct 2006 02:25:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZLuz-0004AM-Q6 for guile-devel@gnu.org; Mon, 16 Oct 2006 02:25:45 -0400 Original-Received: from [217.16.24.5] (helo=mh.altlinux.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GZM43-0003iS-DE for guile-devel@gnu.org; Mon, 16 Oct 2006 02:35:07 -0400 Original-Received: from basalt.office.altlinux.org (localhost.localdomain [127.0.0.1]) by mh.altlinux.org (Postfix) with ESMTP id 02199F50142; Mon, 16 Oct 2006 10:25:41 +0400 (MSD) Original-Received: by basalt.office.altlinux.org (Postfix, from userid 502) id EA77EB0D92; Mon, 16 Oct 2006 10:25:40 +0400 (MSD) Original-To: Neil Jerram Content-Disposition: inline In-Reply-To: <87vemnca65.fsf@ossau.uklinux.net> X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6153 Archived-At: On Sat, Oct 14, 2006 at 02:13:38PM +0100, Neil Jerram wrote: > ludovic.courtes@laas.fr (Ludovic Court?s) writes: >=20 > > As for this: > > > > async.c: In function 'scm_i_queue_async_cell': > > async.c:250: warning: ignoring return value of 'write', declared wi= th attribute warn_unused_result > > > > I don't really understand what this code does, but I have the feeling > > that line 250 could be rewritten this way: > > > > SCM_SYSCALL ((void)write (sleep_fd, &dummy, 1)); > > > > Can somebody familiar with this comment? >=20 > Agreed. Stanislav, can you try this and confirm whether it removes > the warning you are getting? New compiller is a too smart for it ;) -- $ make ... gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -pthread -pipe -Wall -O2 -march=3Di686 -mtune=3Dpentium4 -Wall -Wmissing-prototypes -Werror -c as= ync.c -fPIC -DPIC -o .libs/libguile_la-async.o cc1: warnings being treated as errors async.c: In function 'scm_i_queue_async_cell': async.c:250: warning: ignoring return value of 'write', declared with attribute warn_unused_result make[1]: *** [libguile_la-async.lo] =EF=DB=C9=C2=CB=C1 1 make[1]: Leaving directory `/mnt/archive/RPM/BUILD/guile-1.8.1/libguile' make: *** [all] =EF=DB=C9=C2=CB=C1 2 $ grep SCM_SYSCALL async.c SCM_SYSCALL((void)write (sleep_fd, &dummy, 1)); --=20 I think, you will have to create an explicit tests: -- $ gcc-4.1 -O1 l.c=20 l.c: In function 'main': l.c:6: warning: ignoring return value of 'write', declared with attribute warn_unused_result $ cat l.c=20 #include int main() { char c; (void)write(1,&c,1); return 0; } =09 $ gcc-4.1 -O1 l0.c=20 $ cat l0.c=20 #include int main() { char c; if(write(1,&c,1)); return 0; } $ gcc-4.1 -O1 l1.c=20 $ cat l1.c=20 #include void ignore(int retcode) { } int main() { char c; ignore(write(1,&c,1)); return 0; } =09 The best solution is to create a simple wrapper like this: -- $ gcc -O1 l2.c=20 [stas@stas zzz]$ cat l2.c=20 #include #include #include #include #define CHECK_OR_IGNORE(x) if (x) error(EXIT_FAILURE,errno,#x) int main() { char c; CHECK_OR_IGNORE(write(1,&c,1)); return 0; } =09 -- -- With best regards Stanislav Ievlev; _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel