This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2031fde761fe5f52a51daf95ac8990b14c61f539

commit 2031fde761fe5f52a51daf95ac8990b14c61f539
Author: Guillem Jover <[email protected]>
AuthorDate: Tue Sep 26 20:16:05 2023 +0200

    libdpkg: Refactor struct treewalk_funcs compound initializer into a macro
    
    Warned-by: clang-18
---
 lib/dpkg/treewalk.c | 2 +-
 lib/dpkg/treewalk.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/dpkg/treewalk.c b/lib/dpkg/treewalk.c
index b9a6207f6..4dc62b37c 100644
--- a/lib/dpkg/treewalk.c
+++ b/lib/dpkg/treewalk.c
@@ -374,7 +374,7 @@ treewalk_open(const char *rootdir, enum treewalk_options 
options,
        if (func)
                tree->func = *func;
        else
-               tree->func = (struct treewalk_funcs){ };
+               tree->func = TREEWALK_OBJECT;
 
        root = treenode_root_new(rootdir);
        treenode_stat(root, lstat);
diff --git a/lib/dpkg/treewalk.h b/lib/dpkg/treewalk.h
index 16b7a310c..2e1639871 100644
--- a/lib/dpkg/treewalk.h
+++ b/lib/dpkg/treewalk.h
@@ -54,6 +54,8 @@ struct treewalk_funcs {
        treenode_skip_func *skip;
 };
 
+#define TREEWALK_OBJECT                (struct treewalk_funcs){ }
+
 struct treeroot *
 treewalk_open(const char *rootdir, enum treewalk_options options,
               const struct treewalk_funcs *funcs);

-- 
Dpkg.Org's dpkg

Reply via email to