diff --git a/archival/gzip.c b/archival/gzip.c
index 0962a00..37fefbf 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -263,15 +263,14 @@
 static int foreground;	/* set if program run in foreground */
 static int method = DEFLATED;	/* compression method */
 static int exit_code = OK;	/* program exit code */
-static int part_nb;		/* number of parts in .gz file */
 static long time_stamp;	/* original time stamp (modification time) */
-static long ifile_size;	/* input file size, -1 for devices (debug only) */
 static char z_suffix[MAX_SUFFIX + 1];	/* default suffix (can be set with --suffix) */
-static int z_len;		/* strlen(z_suffix) */
 
 static int ifd;			/* input file descriptor */
 static int ofd;			/* output file descriptor */
+#ifdef DEBUG
 static unsigned insize;	/* valid bytes in inbuf */
+#endif
 static unsigned outcnt;	/* bytes in output buffer */
 
 static uint32_t *crc_32_tab;
@@ -302,7 +301,9 @@
 static void clear_bufs(void)
 {
 	outcnt = 0;
+#ifdef DEBUG
 	insize = 0;
+#endif
 	bytes_in = 0L;
 }
 
@@ -1177,7 +1178,6 @@
 #endif
 
 	strncpy(z_suffix, Z_SUFFIX, sizeof(z_suffix) - 1);
-	z_len = strlen(z_suffix);
 
 	/* Allocate all global buffers (for DYN_ALLOC option) */
 	ALLOC(uch, inbuf, INBUFSIZ + INBUF_EXTRA);
@@ -1188,13 +1188,11 @@
 
 	/* Initialise the CRC32 table */
 	crc_32_tab = crc32_filltable(0);
-	
+
 	clear_bufs();
-	part_nb = 0;
 
 	if (optind == argc) {
 		time_stamp = 0;
-		ifile_size = -1L;
 		zip(STDIN_FILENO, STDOUT_FILENO);
 	} else {
 		int i;
@@ -1205,7 +1203,6 @@
 			clear_bufs();
 			if (strcmp(argv[i], "-") == 0) {
 				time_stamp = 0;
-				ifile_size = -1L;
 				inFileNum = STDIN_FILENO;
 				outFileNum = STDOUT_FILENO;
 			} else {
@@ -1213,7 +1210,6 @@
 				if (fstat(inFileNum, &statBuf) < 0)
 					bb_perror_msg_and_die("%s", argv[i]);
 				time_stamp = statBuf.st_ctime;
-				ifile_size = statBuf.st_size;
 
 				if (!tostdout) {
 					path = xmalloc(strlen(argv[i]) + 4);
diff --git a/archival/rpm.c b/archival/rpm.c
index 7b27c02..d399e0e 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -70,17 +70,15 @@
 static rpm_index **mytags;
 static int tagcount;
 
-void extract_cpio_gz(int fd);
-rpm_index **rpm_gettags(int fd, int *num_tags);
-int bsearch_rpmtag(const void *key, const void *item);
-char *rpm_getstring(int tag, int itemindex);
-int rpm_getint(int tag, int itemindex);
-int rpm_getcount(int tag);
-void exec_script(int progtag, int datatag, char *prefix);
-void fileaction_dobackup(char *filename, int fileref);
-void fileaction_setowngrp(char *filename, int fileref);
-void fileaction_list(char *filename, int itemno);
-void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref));
+static void extract_cpio_gz(int fd);
+static rpm_index **rpm_gettags(int fd, int *num_tags);
+static int bsearch_rpmtag(const void *key, const void *item);
+static char *rpm_getstring(int tag, int itemindex);
+static int rpm_getint(int tag, int itemindex);
+static int rpm_getcount(int tag);
+static void fileaction_dobackup(char *filename, int fileref);
+static void fileaction_setowngrp(char *filename, int fileref);
+static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref));
 
 int rpm_main(int argc, char **argv)
 {
@@ -169,7 +167,7 @@
 	return 0;
 }
 
-void extract_cpio_gz(int fd) {
+static void extract_cpio_gz(int fd) {
 	archive_handle_t *archive_handle;
 	unsigned char magic[2];
 
@@ -196,7 +194,7 @@
 }
 
 
-rpm_index **rpm_gettags(int fd, int *num_tags)
+static rpm_index **rpm_gettags(int fd, int *num_tags)
 {
 	rpm_index **tags = xzalloc(200 * sizeof(struct rpmtag *)); /* We should never need mode than 200, and realloc later */
 	int pass, tagindex = 0;
@@ -235,14 +233,14 @@
 	return tags; /* All done, leave the file at the start of the gzipped cpio archive */
 }
 
-int bsearch_rpmtag(const void *key, const void *item)
+static int bsearch_rpmtag(const void *key, const void *item)
 {
 	int *tag = (int *)key;
 	rpm_index **tmp = (rpm_index **) item;
 	return (*tag - tmp[0]->tag);
 }
 
-int rpm_getcount(int tag)
+static int rpm_getcount(int tag)
 {
 	rpm_index **found;
 	found = bsearch(&tag, mytags, tagcount, sizeof(struct rpmtag *), bsearch_rpmtag);
@@ -250,7 +248,7 @@
 	else return found[0]->count;
 }
 
-char *rpm_getstring(int tag, int itemindex)
+static char *rpm_getstring(int tag, int itemindex)
 {
 	rpm_index **found;
 	found = bsearch(&tag, mytags, tagcount, sizeof(struct rpmtag *), bsearch_rpmtag);
@@ -263,7 +261,7 @@
 	} else return NULL;
 }
 
-int rpm_getint(int tag, int itemindex)
+static int rpm_getint(int tag, int itemindex)
 {
 	rpm_index **found;
 	int n, *tmpint;
@@ -284,7 +282,7 @@
 	} else return -1;
 }
 
-void fileaction_dobackup(char *filename, int fileref)
+static void fileaction_dobackup(char *filename, int fileref)
 {
 	struct stat oldfile;
 	int stat_res;
@@ -301,7 +299,7 @@
 	}
 }
 
-void fileaction_setowngrp(char *filename, int fileref)
+static void fileaction_setowngrp(char *filename, int fileref)
 {
 	int uid, gid;
 	uid = bb_xgetpwnam(rpm_getstring(RPMTAG_FILEUSERNAME, fileref));
@@ -309,12 +307,7 @@
 	chown (filename, uid, gid);
 }
 
-void fileaction_list(char *filename, int ATTRIBUTE_UNUSED fileref)
-{
-	printf("%s\n", filename);
-}
-
-void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref))
+static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref))
 {
 	int count = 0;
 	while (rpm_getstring(filetag, count)) {
