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

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2000ab26e71e91b0c2a9c12e68904239c0b26a5c

commit 2000ab26e71e91b0c2a9c12e68904239c0b26a5c (HEAD -> master)
Author: Guillem Jover <[email protected]>
AuthorDate: Mon Oct 7 03:55:19 2019 +0200

    dpkg, u-a: Make variables static
    
    Warned-by: sparse
---
 debian/changelog            |  1 +
 src/main.c                  | 15 ++++++++++++---
 utils/update-alternatives.c |  2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f5e406bef..d1284e0e5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -59,6 +59,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
     - dselect: Make baselist::draw_column_*() col arguments const.
     - libdpkg: Use p instead of name in dpkg_arch_name_is_illegal().
     - dpkg: Remove redudant condition for sourcefile in updateavailable().
+    - dpkg, update-alternatives: Make variables static.
   * Build system:
     - Bump minimal Perl version to 5.24.1.
     - Add a serial versioning to the m4 files.
diff --git a/src/main.c b/src/main.c
index 0cc8759af..61e186904 100644
--- a/src/main.c
+++ b/src/main.c
@@ -350,9 +350,18 @@ is_invoke_action(enum action action)
   }
 }
 
-struct invoke_list pre_invoke_hooks = { .head = NULL, .tail = 
&pre_invoke_hooks.head };
-struct invoke_list post_invoke_hooks = { .head = NULL, .tail = 
&post_invoke_hooks.head };
-struct invoke_list status_loggers = { .head = NULL, .tail = 
&status_loggers.head };
+static struct invoke_list pre_invoke_hooks = {
+  .head = NULL,
+  .tail = &pre_invoke_hooks.head,
+};
+static struct invoke_list post_invoke_hooks = {
+  .head = NULL,
+  .tail = &post_invoke_hooks.head,
+};
+static struct invoke_list status_loggers = {
+  .head = NULL,
+  .tail = &status_loggers.head,
+};
 
 static void
 set_invoke_hook(const struct cmdinfo *cip, const char *value)
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index a57e97081..a9180705b 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -71,7 +71,7 @@ enum action {
        ACTION_DISPLAY,
 };
 
-struct action_name {
+static struct action_name {
        enum action action;
        const char *name;
 } action_names[] = {

-- 
Dpkg.Org's dpkg

Reply via email to