Subject: bug#77815: [PATCH 1/1] initialize env_argc & env_argv

From: Christian Hesse <[email-masked]>
Date: Mon, 14 Apr 2025 18:05:50 +0200

... as the compiler complains:

gzip.c: In function 'main':
gzip.c:465:24: error: 'env_argc' may be used uninitialized [-Werror=maybe-uninitialized]
  465 |                 optc = getopt_long (env_argc, env_argv, shortopts, longopts,
      |                        ^
gzip.c:413:9: note: 'env_argc' was declared here
  413 |     int env_argc;
      |         ^
lto1: all warnings being treated as errors
---
 gzip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gzip.c b/gzip.c
index 913fafe..65aa1ed 100644
--- a/gzip.c
+++ b/gzip.c
@@ -410,8 +410,8 @@ int main (int argc, char **argv)
     int file_count;     /* number of files to process */
     size_t proglen;     /* length of program_name */
     char **argv_copy;
-    int env_argc;
-    char **env_argv;
+    int env_argc = 0;
+    char **env_argv = NULL;
 
     EXPAND(argc, argv); /* wild card expansion if necessary */