commit c961731: [Minor] Fix compiler warnings in src/libutil/util.c

Anton Yuzhaninov citrin+git at citrin.ru
Tue Sep 21 11:35:04 UTC 2021


Author: Anton Yuzhaninov
Date: 2021-09-21 10:28:43 +0100
URL: https://github.com/rspamd/rspamd/commit/c961731c94d13a96ac94237c945357beb9217499 (refs/pull/3902/head)

[Minor] Fix compiler warnings in src/libutil/util.c
src/libutil/util.c:1362:7: warning: unused variable 'len' [-Wunused-variable]
        gint len = 0;
             ^
src/libutil/util.c:1363:8: warning: unused variable 'pass' [-Wunused-variable]
        gchar pass[BUFSIZ];
              ^
2 warnings generated.

---
 src/libutil/util.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/libutil/util.c b/src/libutil/util.c
index d1cc65c1c..27631ae65 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -1359,9 +1359,6 @@ gint
 rspamd_read_passphrase (gchar *buf, gint size, gint rwflag, gpointer key)
 {
 #ifdef HAVE_READPASSPHRASE_H
-	gint len = 0;
-	gchar pass[BUFSIZ];
-
 	if (readpassphrase ("Enter passphrase: ", buf, size, RPP_ECHO_OFF |
 		RPP_REQUIRE_TTY) == NULL) {
 		return 0;
@@ -2459,4 +2456,4 @@ rspamd_ptr_array_shuffle (GPtrArray *ar)
 		g_ptr_array_index (ar, j) = g_ptr_array_index (ar, i);
 		g_ptr_array_index (ar, i) = t;
 	}
-}
\ No newline at end of file
+}


More information about the Commits mailing list