Skip to content

Commit 022d33d

Browse files
committed
CI: Update clang-format to 21
1 parent 77f36b8 commit 022d33d

17 files changed

Lines changed: 21 additions & 35 deletions

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ clang_format:
3030
stage: build
3131
before_script:
3232
- apt-get update
33-
- apt-get install --yes --no-install-recommends git clang-format-19
33+
- apt-get install --yes --no-install-recommends git clang-format-21
3434
script:
35-
- find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format-19 -i {} \;
35+
- find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format-21 -i {} \;
3636
- git diff --exit-code
3737

3838
build:

README.contributors

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To get the clang-format warnings locally instead at CI time we recommend you
3030
to copy the hooks/pre-commit to your .git
3131
cp hooks/pre-commit .git/hooks/
3232

33-
We are using clang-format 19 on CI. Unfortunately clang-format is not totally
33+
We are using clang-format 21 on CI. Unfortunately clang-format is not totally
3434
compatible with older versions of itself. If CI gives you trouble but your local
3535
clang-format disagrees, just apply the changes suggested by CI and then commit
3636
with the --no-verify flag. If you get stuck, don't hesitate to ask the reviewer

poppler/CourierBoldObliqueWidths.pregenerated.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ __inline
3232
inline
3333
# endif
3434
#endif
35-
static unsigned int
36-
hash(register const char *str, register size_t len)
35+
static unsigned int hash(register const char *str, register size_t len)
3736
{
3837
static const unsigned short asso_values[] = { 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
3938
1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,

poppler/CourierBoldWidths.pregenerated.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ __inline
3232
inline
3333
# endif
3434
#endif
35-
static unsigned int
36-
hash(register const char *str, register size_t len)
35+
static unsigned int hash(register const char *str, register size_t len)
3736
{
3837
static const unsigned short asso_values[] = { 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
3938
1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,

poppler/CourierObliqueWidths.pregenerated.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ __inline
3232
inline
3333
# endif
3434
#endif
35-
static unsigned int
36-
hash(register const char *str, register size_t len)
35+
static unsigned int hash(register const char *str, register size_t len)
3736
{
3837
static const unsigned short asso_values[] = { 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
3938
1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,

poppler/CourierWidths.pregenerated.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ __inline
3232
inline
3333
# endif
3434
#endif
35-
static unsigned int
36-
hash(register const char *str, register size_t len)
35+
static unsigned int hash(register const char *str, register size_t len)
3736
{
3837
static const unsigned short asso_values[] = { 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
3938
1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,

poppler/GfxState.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4519,7 +4519,7 @@ GfxGouraudTriangleShading::GfxGouraudTriangleShading(const GfxGouraudTriangleSha
45194519
vertices = (GfxGouraudVertex *)gmallocn(nVertices, sizeof(GfxGouraudVertex));
45204520
memcpy(vertices, shading->vertices, nVertices * sizeof(GfxGouraudVertex));
45214521
nTriangles = shading->nTriangles;
4522-
triangles = (int(*)[3])gmallocn(nTriangles * 3, sizeof(int));
4522+
triangles = (int (*)[3])gmallocn(nTriangles * 3, sizeof(int));
45234523
memcpy(triangles, shading->triangles, nTriangles * 3 * sizeof(int));
45244524
for (const auto &f : shading->funcs) {
45254525
funcs.emplace_back(f->copy());
@@ -4541,7 +4541,7 @@ std::unique_ptr<GfxGouraudTriangleShading> GfxGouraudTriangleShading::parse(GfxR
45414541
double xMul, yMul;
45424542
double cMul[gfxColorMaxComps];
45434543
GfxGouraudVertex *verticesA;
4544-
int(*trianglesA)[3];
4544+
int (*trianglesA)[3];
45454545
int nComps, nVerticesA, nTrianglesA, vertSize, triSize;
45464546
unsigned int x, y, flag;
45474547
unsigned int c[gfxColorMaxComps];
@@ -4688,7 +4688,7 @@ std::unique_ptr<GfxGouraudTriangleShading> GfxGouraudTriangleShading::parse(GfxR
46884688
} else if (state == 2 || flag > 0) {
46894689
if (nTrianglesA == triSize) {
46904690
triSize = (triSize == 0) ? 16 : 2 * triSize;
4691-
trianglesA = (int(*)[3])greallocn(trianglesA, triSize * 3, sizeof(int));
4691+
trianglesA = (int (*)[3])greallocn(trianglesA, triSize * 3, sizeof(int));
46924692
}
46934693
if (state == 2) {
46944694
trianglesA[nTrianglesA][0] = nVerticesA - 3;
@@ -4714,7 +4714,7 @@ std::unique_ptr<GfxGouraudTriangleShading> GfxGouraudTriangleShading::parse(GfxR
47144714
if (typeA == 5 && nVerticesA > 0 && vertsPerRow > 0) {
47154715
nRows = nVerticesA / vertsPerRow;
47164716
nTrianglesA = (nRows - 1) * 2 * (vertsPerRow - 1);
4717-
trianglesA = (int(*)[3])gmallocn_checkoverflow(nTrianglesA * 3, sizeof(int));
4717+
trianglesA = (int (*)[3])gmallocn_checkoverflow(nTrianglesA * 3, sizeof(int));
47184718
if (unlikely(!trianglesA)) {
47194719
gfree(verticesA);
47204720
return nullptr;

poppler/HelveticaBoldObliqueWidths.pregenerated.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ __inline
3232
inline
3333
# endif
3434
#endif
35-
static unsigned int
36-
hash(register const char *str, register size_t len)
35+
static unsigned int hash(register const char *str, register size_t len)
3736
{
3837
static const unsigned short asso_values[] = { 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
3938
1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,

poppler/HelveticaBoldWidths.pregenerated.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ __inline
3232
inline
3333
# endif
3434
#endif
35-
static unsigned int
36-
hash(register const char *str, register size_t len)
35+
static unsigned int hash(register const char *str, register size_t len)
3736
{
3837
static const unsigned short asso_values[] = { 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002,
3938
1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002,

poppler/HelveticaObliqueWidths.pregenerated.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ __inline
3232
inline
3333
# endif
3434
#endif
35-
static unsigned int
36-
hash(register const char *str, register size_t len)
35+
static unsigned int hash(register const char *str, register size_t len)
3736
{
3837
static const unsigned short asso_values[] = { 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
3938
1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,

0 commit comments

Comments
 (0)