qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in #ifdef


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in #ifdef
Date: Mon, 3 Nov 2014 15:05:53 +0000

On 3 November 2014 14:27, Michael Tokarev <address@hidden> wrote:

> I usually reluctant to add these unused attributes and shut up other
> warnings by force, because with time this cruft does not help, and
> more and more code becomes "forgotten".  If it is not needed for
> windows, why add it?

You could equally ask why we've marked the function "inline"
for both, when it's currently only required for non-win32
and only needed because it silences the warning on gcc.

> Hence the "untested" warning by me... So the test can be rewritten
> like this:
>
> #elif defined(USE_STATIC_CODE_GEN_BUFFER) || !defined(USE_MMAP)
>
> (untested again! ;) and everything should be well without adding
> extra attributes...  Which one is better is, well, a matter of
> personal taste really.. :)

Yeah, that's the "close coupling between warning-suppressing
and the implementation of a different bit of the code" approach.
As you say, personal taste; I've applied my r-by tag to the
other one ;-)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]