compilation error with WITHOUT_ED_CRYPTO
deeptech71
deeptech71 at gmail.com
Fri Mar 22 14:55:16 UTC 2013
/usr/src/bin/ed/cbc.c:76:13: error: unused variable 'bits'
[-Werror,-Wunused-variable]
static char bits[] = { /* used to extract bits from a char */
^
/usr/src/bin/ed/cbc.c:80:12: error: unused variable 'pflag'
[-Werror,-Wunused-variable]
static int pflag; /* 1 to preserve parity bits */
^
/usr/src/bin/ed/cbc.c:86:22: error: unused variable 'des_buf'
[-Werror,-Wunused-variable]
static unsigned char des_buf[8];/* shared buffer for get_des_char/put_de...
^
/usr/src/bin/ed/cbc.c:87:12: error: unused variable 'des_ct'
[-Werror,-Wunused-variable]
static int des_ct = 0; /* count for get_des_char/put_des_char */
^
/usr/src/bin/ed/cbc.c:88:12: error: unused variable 'des_n'
[-Werror,-Wunused-variable]
static int des_n = 0; /* index for put_des_char/get_des_char */
^
The obvious fix: widen the scope of ``#ifdef DES'':
Index: bin/ed/cbc.c
===================================================================
--- bin/ed/cbc.c (revision 248614)
+++ bin/ed/cbc.c (working copy)
@@ -71,7 +71,6 @@
#ifdef DES
static DES_cblock ivec; /* initialization vector */
static DES_cblock pvec; /* padding vector */
-#endif
static char bits[] = { /* used to extract bits from a char */
'\200', '\100', '\040', '\020', '\010', '\004', '\002', '\001'
@@ -79,13 +78,12 @@
static int pflag; /* 1 to preserve parity bits */
-#ifdef DES
static DES_key_schedule schedule; /* expanded DES key */
-#endif
static unsigned char des_buf[8];/* shared buffer for get_des_char/put_des_char */
static int des_ct = 0; /* count for get_des_char/put_des_char */
static int des_n = 0; /* index for put_des_char/get_des_char */
+#endif
/* init_des_cipher: initialize DES */
void
More information about the freebsd-current
mailing list