qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Headers without multiple inclusion guards


From: Laszlo Ersek
Subject: Re: [Qemu-devel] Headers without multiple inclusion guards
Date: Mon, 3 Jun 2019 12:57:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 05/29/19 16:10, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <address@hidden> writes:
> 
>> On 5/28/19 8:12 PM, Markus Armbruster wrote:
>>> We have a bunch of headers without multiple inclusion guards.  Some are
>>> clearly intentional, some look accidental.  Too many for me to find out
>>> by examining each of them, so I'm asking their maintainers.
>>>
>>> Why do I ask?  I'd like to mark the intentional ones and fix the
>>> accidental ones, so they don't flunk "make check-headers" from "[RFC v4
>>> 0/7] Baby steps towards saner headers" just because they lack multiple
>>> inclusion guards.
>>>
>>> Just in case: what's a multiple inclusion guard?  It's
>>>
>>>     #ifndef UNIQUE_GUARD_SYMBOL_H
>>>     #define UNIQUE_GUARD_SYMBOL_H
>>>     ...
>>>     #endif
>>>
>>> with nothing but comments outside the conditional, so that the header
>>> can safely be included more than once.
>>>
>>> I append the alphabetical list of headers without multiple inclusion
>>> guards (as reported by scripts/clean-header-guards -nv), followed by the
>>> same list sorted into maintainer buckets.  If you're cc'ed, please find
>>> your bucket(s), and tell me which headers intentionally lack guards.
>>>
>> [...]
>>>
>>> EDK2 Firmware
>>> M: Laszlo Ersek <address@hidden>
>>> M: Philippe Mathieu-Daudé <address@hidden>
>>> tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h
>>
>> This file has a guard in non-standard formats:
>>
>> #ifndef __BIOS_TABLES_TEST_H__
>> #define __BIOS_TABLES_TEST_H__
>> ...
> 
> scripts/clean-header-guards.pl didn't recognize the guard due to the //
> comment after the #endif.  I fixed the script, then used it to clean up
> this header.
> 
> Thanks!
> 

(Sorry, I've just replied to the thread starter, before seeing this
subthread. I'm OK if the header file is cleaned up.)



reply via email to

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