Skip to content

Commit 48a54b7

Browse files
FelonEkonomclaude
andcommitted
Silence #pragma-once native build warning so docs lint passes
The lint CI job runs `mix docs && mix docs 2>&1 | (! grep -q "warning:")`. The unifex-generated cnode source `_generated/cnode/native.c` begins with `#pragma once`, and the GCC version now shipped in the CI docker image emits a `#pragma once in main file` warning when compiling it. GCC has no dedicated `-Wno-*` flag for this diagnostic, so the only reliable way to keep this generated-code noise out of the docs warning check is `-w` on the native. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3b936ab commit 48a54b7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

bundlex.exs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ defmodule ExLibnice.BundlexProject do
1414
deps: [unifex: :unifex],
1515
os_deps: [nice: :pkg_config],
1616
interface: [:nif, :cnode],
17-
preprocessor: Unifex
17+
preprocessor: Unifex,
18+
# Silence native build warnings. The unifex-generated cnode `native.c`
19+
# starts with `#pragma once`, and newer GCC (in the CI image) emits a
20+
# `#pragma once in main file` warning for it. That warning has no
21+
# dedicated `-Wno-*` flag in GCC, so the docs lint check
22+
# (`mix docs ... | ! grep "warning:"`) would otherwise fail on this
23+
# generated-code noise.
24+
compiler_flags: ["-w"]
1825
]
1926
]
2027
end

0 commit comments

Comments
 (0)