[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] configure: mark qemu-ga VSS includes as system

From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH] configure: mark qemu-ga VSS includes as system headers
Date: Wed, 29 Jun 2016 10:27:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 29.06.2016 01:43, Michael Roth wrote:
> As of e4650c81, we do w32 builds with -Werror enabled. Unfortunately
> for cases where we enable VSS support in qemu-ga, we still have
> warnings generated by VSS includes that ship as part of the Microsoft
> We can selectively address a number of these warnings using
>   #pragma GCC diagnostic ignored ...
> but at least one of these:
>   warning: ‘typedef’ was ignored in this declaration
> resulting from declarations of the form:
>   typedef struct Blah { ... };
> does not provide a specific command-line/pragma option to disable
> warnings of the sort.
> To allow VSS builds to succeed, the next-best option is disabling
> these warnings on a per-file basis. pragmas like #pragma GCC
> system_header can be used to declare subsequent includes/declarations
> as being exempt from normal warnings, but this must be done within
> a header file.
> Since we don't control the VSS SDK, we'd need to rely on a
> intermediate header include to accomplish this, and
> since different objects in the VSS link target rely on different
> headers from the VSS SDK, this would become somewhat of a rat's nest
> (though not totally unmanageable).
> The next step up in granularity is just marking the entire VSS
> SDK include path as system headers via -isystem. This is a bit more
> heavy-handed, but since this SDK hasn't changed since 2005, there's
> likely little to be gained from selectively disabling warnings
> anyway, so we implement that approach here.
> This fixes the -Werror failures in both the configure test and the
> qga build due to shared reliance on $vss_win32_include. For the
> same reason, this also enforces a new dependency on -isystem support
> in the C/C++ compiler when building QGA with VSS enabled.

Did we ever support any non-GCC-based compiler for building QGA? I don't
think so, but in the worst case, we could later add a check whether the
compiler supports that parameter, too...

Anyway, I think your patch is a nice and clean way to deal with the
error messages from these headers, so:

Reviewed-by: Thomas Huth <address@hidden>

reply via email to

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