From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS7vn-0004p8-4i for qemu-devel@nongnu.org; Wed, 19 Aug 2015 14:17:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZS7vj-0008L9-N5 for qemu-devel@nongnu.org; Wed, 19 Aug 2015 14:17:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS7vj-0008JU-GY for qemu-devel@nongnu.org; Wed, 19 Aug 2015 14:17:43 -0400 Message-ID: <1440008259.4246.23.camel@redhat.com> From: Gerd Hoffmann Date: Wed, 19 Aug 2015 20:17:39 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 17/25] audio: remove gcc specific audio_MIN, audio_MAX List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?K=C5=91v=C3=A1g=C3=B3=2C_Zolt=C3=A1n?= Cc: qemu-devel@nongnu.org On Do, 2015-08-06 at 20:28 +0200, K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n wrot= e: > Currently the gcc specific version only evaluates the arguments once, > while the generic version evaluates one argument twice, which can cause > debugging headaches when an argument has a side effect. The answer to that is "don't do that". Do we have macro calls with side effects in the tree? > This patch at least provides consistent behavior between compilers. Makes sense. > -#else > #define audio_MIN(a, b) ((a)>(b)?(b):(a)) > #define audio_MAX(a, b) ((a)<(b)?(b):(a)) > -#endif include/qemu/osdep.h already provides MIN/MAX macros. I think we should either define audio_MIN (and audio_MAX) to those, or simply do s/audio_MIN/MIN/ in audio/*.c cheers, Gerd