Skip to content

Commit 44744e5

Browse files
authored
Merge pull request #21696 from crasbe/pr/double_pragma
dist/tools: add double `#pragma once` error message to headerguards check
2 parents 1be70cf + 22ade24 commit 44744e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dist/tools/headerguards/headerguards.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ def fix_headerguard(filename):
9898
print("%s: #pragma once and classic header guards used in the same file" %
9999
filename, file=sys.stderr)
100100
return False
101+
elif (pragma_once_found > 1):
102+
print("%s: More than one #pragma once in the same file" %
103+
filename, file=sys.stderr)
104+
return False
101105
else:
102106
print("%s: broken header guard" % filename, file=sys.stderr)
103107
return False

0 commit comments

Comments
 (0)