From 1940b5efa65f5bdcf6b9b39f80bbe330fcc8d90c Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Mon, 19 May 2025 16:32:22 +1200 Subject: [PATCH] Fix clang 20 unused-function warnings Remove unused function: static inline struct ldb_val talloc_steal_ldb_val(TALLOC_CTX *mem_ctx, struct ldb_val val) From source4/kdc/ad_claims.c 1 error generated. Signed-off-by: Gary Lockyer Reviewed-by: Douglas Bagnall Reviewed-by: Anoop C S --- buildtools/wafsamba/samba_autoconf.py | 1 - source4/kdc/ad_claims.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index ad86a4f025e..255e63b7ff8 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -843,7 +843,6 @@ int main(void) { conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Werror -Wno-error=deprecated-declarations', testflags=True) conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=tautological-compare', testflags=True) conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=cast-align', testflags=True) - conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=unused-function', testflags=True) conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=format-truncation', testflags=True) conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=cast-qual', testflags=True) conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=format-nonliteral', testflags=True) diff --git a/source4/kdc/ad_claims.c b/source4/kdc/ad_claims.c index 1f3df007f36..f2fd6b4a5fb 100644 --- a/source4/kdc/ad_claims.c +++ b/source4/kdc/ad_claims.c @@ -654,12 +654,6 @@ static int get_assigned_silo(struct ldb_context *ldb, return LDB_SUCCESS; } -static inline struct ldb_val talloc_steal_ldb_val(TALLOC_CTX *mem_ctx, struct ldb_val val) -{ - val.data = talloc_steal(mem_ctx, val.data); - return val; -} - static uint32_t claim_get_value_count(const struct CLAIM_ENTRY *claim) { switch (claim->type) { -- 2.47.2