On Sun, May 15, 2022 at 11:56 AM Arthur Heymans arthur@aheymans.xyz wrote:
Hi
To make sure headers don't create conflicts, guards are added to all of them. But the guard needs to be correct: e.g. https://review.coreboot.org/c/coreboot/+/64360/2
A few more that I noticed by grepping around: https://review.coreboot.org/c/coreboot/+/64364
Most compilers implement '#pragma once ' as an alternative. Should we use this instead across the tree, as it is less error prone and less code?
Sounds good to me. It will also mitigate awkward guards with paths in them, for example in src/mainboard/google/smaug/pmic.h which uses `#ifndef __MAINBOARD_GOOGLE_FOSTER_PMIC_H__`. (This should probably be factored out into a common header that smaug and foster include, but that's another matter)