[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode |
Date: |
Mon, 14 Jan 2019 16:23:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2019-01-14 16:02, Eric Blake wrote:
> On 1/14/19 8:53 AM, Thomas Huth wrote:
>> On 2019-01-14 15:50, Eric Blake wrote:
>>> On 1/14/19 8:31 AM, Daniel P. Berrangé wrote:
>>>
>>>>>
>>>>> Can we suppress the warnings with #pragma instead ?
>>>>> That would avoid compiling the .o file with different
>>>>> C semantics.
>>>>
>>>> IIUC this is a built-in warning you can't disable, except by changing
>>>> the compilation mode to have gnu89 inline semantics :-(
>>>
>>> Could we instead fix the warning by one of:
>>>
>>> Using pragma to declare the header as a system header (used to silence
>>> warnings from misbehaving external headers),
>>
>> How do you do that?
>
> Using -isystem instead of -I - but that means rewriting the output of
> pkg-config.
That does not work for me on RHEL7: The output of "pkg-config --cflags
libiscsi" is empty since the headers are in a standard location. And
even if I add "-isystem /usr/include" or "-isystem /usr/include/iscsi"
manually, the warning does not go away.
>>> and/or adding #defines around the inclusion of the header to neutralize
>>> the poor warnings,
>>
>> You mean something like:
>>
>> #define inline /* nothing */
>
> or
> https://stackoverflow.com/questions/1867065/how-to-suppress-gcc-warnings-from-library-headers
> mentions:
>
> // save diagnostic state
> #pragma GCC diagnostic push
>
> // turn off the specific warning. Can also use "-Wall"
> #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
That does not work in this case here, too, since there is no dedicated
option to switch this warning on or off.
>> The patch is only changing libiscsi_cflags, so it's not affecting the
>> entire project, but just the files that use libiscsi.
>
> Even so, limiting the damage to just the wrapper file that includes the
> problematic header rather than changing the command line for the entire
> compilation of those files that use libiscsi is even more precise.
Then our only option is "#define inline /* nothing */", as far as I can
see...
Thomas
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Peter Maydell, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Daniel P . Berrangé, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Eric Blake, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Eric Blake, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode,
Thomas Huth <=
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Daniel P . Berrangé, 2019/01/14
Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Philippe Mathieu-Daudé, 2019/01/14