From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Message-id: From: Pietro Gagliardi To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-transfer-encoding: quoted-printable Date: Sun, 29 Jun 2008 09:53:39 -0400 Subject: [9fans] kenc: casting expression to void not ignored Topicbox-Message-UUID: cb4dba1e-ead3-11e9-9d60-3106f5b1d025 Hello. I have a simple push macro for a stack machine interpreter. It =20= looks like this: #define push(s) ((void)(((stackptr >=3D (stack + stacksize)) ? =20= growstack() : (void)0), (*stackptr++ =3D errcheck(s)))) Does this boggle the mind? It's very simple: it checks for stack =20 overflow and makes the stack bigger if so, then checks to see if s, a =20= double, is NaN or =B1Inf, and finally pushes it onto the stack if not =20= (errcheck calls longjmp - how I wish I had try). However, when I use the push macro, I get tons of warnings like this: warning: run.c:170 result of operation not used Shouldn't the cast to void mean that I don't intend to use the result =20= of the operation? Thanks.