[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 2/5] tools: get rid of additional min() and max() definitions


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 22 Mar 2023 13:38:40 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LhCfI+UJ6kcIvxOraok5+HnXpJKlc47SPJr6cW2N9JQ=; b=lC6mYk5nIp6+Yykm/EvBoBxfX7DJPq86vEbbrUs6XfNvFa54otkaNVfnlKlOPsB+pzJ8vWDdh4xxCCJr2sZV9DRAouGnFQjZDRPTuE/GzEHBUk1kjil5h5B7g6ty2kSulgOP5Xvwbi7+YlzAqkWWuh3XEbRox6UL9NsIfHms76vvkLdtpoLZr1lWbkYLJn5fT2Y5pGleIqlkkunhKZ/RQXPrKX3BSpyflJ2BNcjzHLpr/eBERAIBDRn4w9QD7dGvNCtS1DOLfWeVEtsfap9+iD6zGWLcukTSkmDQW1DDVX0rHA3a5jFOF+bkzvRXrSj9VNwpumLoJP8wJ6ZEZ4mzpQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IvyCq0h8YdhDaxkp5lXlTyv4d8oaz/U31pqqvD/oyrlBy0joKKiYBpZ7sYwoZ3u+ttO5khh1nXJJKxF8t+q5AGNz+I3JFe+yYKhVS6FFKVJLF+VpcEVVoy32+ERn/WPPj83GAjW0tK56zEE8x3mPSRSjFUMIqqeWkNlYc6jyAsAXIjvY7zrLQdZWCxQzs9OJNH02nmJxBWAjsvmayZiuMB4xkbtV8tTqBBQgZ7cwtng03Kw8ikKRBVkwldeaLv7WPaeRVRHBaCsSE9D51UztCXIddvpDJITzLE50CL/Ehl3R2B/WhWBp6tkmr2Yy6wdJ51C4GDjW88uXNIx11w0XqA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 22 Mar 2023 12:38:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.03.2023 13:08, Juergen Gross wrote:
> --- a/tools/tests/vpci/emul.h
> +++ b/tools/tests/vpci/emul.h
> @@ -106,22 +106,6 @@ typedef union {
>  #define BUG() assert(0)
>  #define ASSERT_UNREACHABLE() assert(0)
>  
> -#define min(x, y) ({                    \
> -        const typeof(x) tx = (x);       \
> -        const typeof(y) ty = (y);       \
> -                                        \
> -        (void) (&tx == &ty);            \
> -        tx < ty ? tx : ty;              \
> -})
> -
> -#define max(x, y) ({                    \
> -        const typeof(x) tx = (x);       \
> -        const typeof(y) ty = (y);       \
> -                                        \
> -        (void) (&tx == &ty);            \
> -        tx > ty ? tx : ty;              \
> -})

The new include is added to this file by the first patch. How do things
build warning-free before these macros (functionally compatible but
different in the specific tokens used) are removed, i.e. before this
patch is (also) applied?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.