From ec62fc1399ae12daa230c6be55d9ae7671174c39 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Tue, 13 Aug 2024 11:28:41 +0200 Subject: [PATCH 1/2] Update Clang to version 19 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 136ec41d4f..60c0657d7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ variables: TEST_PARALLEL_JOBS: 4 CONFIGURE: ./configure - CLANG_VERSION: 18 + CLANG_VERSION: 19 CLANG: "clang-${CLANG_VERSION}" SCAN_BUILD: "scan-build-${CLANG_VERSION}" LLVM_SYMBOLIZER: "/usr/lib/llvm-${CLANG_VERSION}/bin/llvm-symbolizer" From 7b756350f5a63e4c774a37762c83aa2e7d2df291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 15 Aug 2024 09:36:53 +0200 Subject: [PATCH 2/2] Use clang-format-19 to update formatting This is purely result of running: git-clang-format-19 --binary clang-format-19 origin/main --- bin/named/server.c | 4 ++-- lib/dns/rdata/generic/opt_41.c | 4 ++-- lib/dns/rdataslab.c | 3 +-- lib/isc/include/isc/thread.h | 2 +- lib/isc/netmgr/netmgr-int.h | 2 +- tests/bench/load-names.c | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bin/named/server.c b/bin/named/server.c index eacd3ac88c..57d1f9abf6 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -152,11 +152,11 @@ #endif /* HAVE_LMDB */ #ifndef SIZE_MAX -#define SIZE_MAX ((size_t) - 1) +#define SIZE_MAX ((size_t)-1) #endif /* ifndef SIZE_MAX */ #ifndef SIZE_AS_PERCENT -#define SIZE_AS_PERCENT ((size_t) - 2) +#define SIZE_AS_PERCENT ((size_t)-2) #endif /* ifndef SIZE_AS_PERCENT */ /* RFC7828 defines timeout as 16-bit value specified in units of 100 diff --git a/lib/dns/rdata/generic/opt_41.c b/lib/dns/rdata/generic/opt_41.c index 12695d1a50..433df37299 100644 --- a/lib/dns/rdata/generic/opt_41.c +++ b/lib/dns/rdata/generic/opt_41.c @@ -72,9 +72,9 @@ totext_opt(ARGS_TOTEXT) { or = r; or.length = length; if (tctx->width == 0) { /* No splitting */ - RETERR(isc_base64_totext(& or, 60, "", target)); + RETERR(isc_base64_totext(&or, 60, "", target)); } else { - RETERR(isc_base64_totext(& or, tctx->width - 2, + RETERR(isc_base64_totext(&or, tctx->width - 2, tctx->linebreak, target)); } diff --git a/lib/dns/rdataslab.c b/lib/dns/rdataslab.c index 67f5101806..1c8bb816d8 100644 --- a/lib/dns/rdataslab.c +++ b/lib/dns/rdataslab.c @@ -89,8 +89,7 @@ struct xrdata { #endif /* if DNS_RDATASET_FIXED */ }; -#define peek_uint16(buffer) \ - ({ ((uint16_t) * (buffer) << 8) | *((buffer) + 1); }) +#define peek_uint16(buffer) ({ ((uint16_t)*(buffer) << 8) | *((buffer) + 1); }) #define get_uint16(buffer) \ ({ \ uint16_t __ret = peek_uint16(buffer); \ diff --git a/lib/isc/include/isc/thread.h b/lib/isc/include/isc/thread.h index a24dfcdca5..8920ca2f19 100644 --- a/lib/isc/include/isc/thread.h +++ b/lib/isc/include/isc/thread.h @@ -54,6 +54,6 @@ isc_thread_yield(void); void isc_thread_setname(isc_thread_t thread, const char *name); -#define isc_thread_self (uintptr_t) pthread_self +#define isc_thread_self (uintptr_t)pthread_self ISC_LANG_ENDDECLS diff --git a/lib/isc/netmgr/netmgr-int.h b/lib/isc/netmgr/netmgr-int.h index 51da0a309e..03f7ba3a08 100644 --- a/lib/isc/netmgr/netmgr-int.h +++ b/lib/isc/netmgr/netmgr-int.h @@ -134,7 +134,7 @@ STATIC_ASSERT(ISC_NETMGR_TCP_RECVBUF_SIZE <= ISC_NETMGR_RECVBUF_SIZE, #if defined(__linux__) #include -#define gettid() (uint64_t) syscall(SYS_gettid) +#define gettid() (uint64_t)syscall(SYS_gettid) #elif defined(__FreeBSD__) #include #define gettid() (uint64_t)(pthread_getthreadid_np()) diff --git a/tests/bench/load-names.c b/tests/bench/load-names.c index 70d7d07443..4a11375a98 100644 --- a/tests/bench/load-names.c +++ b/tests/bench/load-names.c @@ -566,7 +566,7 @@ main(int argc, char *argv[]) { void *map = NULL; isc_mem_create(&mem); - map = fun->new (mem); + map = fun->new(mem); size_t nitems = lines / (nthreads + 1);