From dafbd075c5d2061123f993e704a1bc89607af252 Mon Sep 17 00:00:00 2001 From: Andre Renaud Date: Sun, 5 Jul 2026 14:07:37 +1200 Subject: [PATCH 1/2] clang-format: Make it consistent with latest versions --- Dockerfile | 5 +++-- pdfgen.c | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4cc3622..0b8fd58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,6 @@ RUN apt-get update && apt-get install -y dirmngr RUN apt-get update && apt-get install --no-install-recommends -y \ ca-certificates \ clang \ - clang-format \ clang-tools \ cloc \ colordiff \ @@ -39,7 +38,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ xz-utils \ zbar-tools -RUN python3 -m pip install --break-system-packages cpp-coveralls +# clang-format is pinned so that CI and developer machines format identically; +# the Ubuntu package (v18) formats compound literals differently to v19+ +RUN python3 -m pip install --break-system-packages cpp-coveralls clang-format==22.1.8 # Install Infer RUN mkdir -p /opt && curl -L https://github.com/facebook/infer/releases/download/v1.2.0/infer-linux-x86_64-v1.2.0.tar.xz | tar -C /opt -x -J diff --git a/pdfgen.c b/pdfgen.c index 1b20485..03c7ef6 100644 --- a/pdfgen.c +++ b/pdfgen.c @@ -719,10 +719,8 @@ static inline void *flexarray_get(const struct flexarray *flex, int index) */ #define INIT_DSTR \ - (struct dstr) \ - { \ - .static_data = {0}, .data = NULL, .alloc_len = 0, .used_len = 0 \ - } + (struct dstr){ \ + .static_data = {0}, .data = NULL, .alloc_len = 0, .used_len = 0} static char *dstr_data(struct dstr *str) { From 169ba1e638ddfbb7246afaedeaaa89f92095b328 Mon Sep 17 00:00:00 2001 From: Andre Renaud Date: Sun, 5 Jul 2026 14:13:41 +1200 Subject: [PATCH 2/2] Try and fix windows --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0b8fd58..0bd9059 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ # clang-format is pinned so that CI and developer machines format identically; # the Ubuntu package (v18) formats compound literals differently to v19+ -RUN python3 -m pip install --break-system-packages cpp-coveralls clang-format==22.1.8 +RUN python3 -m pip install --break-system-packages cpp-coveralls clang-format>=22.1 # Install Infer RUN mkdir -p /opt && curl -L https://github.com/facebook/infer/releases/download/v1.2.0/infer-linux-x86_64-v1.2.0.tar.xz | tar -C /opt -x -J