Re: compilation error with WITHOUT_ED_CRYPTO

2013-03-23 Thread John-Mark Gurney
deeptech71 wrote this message on Fri, Mar 22, 2013 at 15:55 +0100:
 The obvious fix: widen the scope of ``#ifdef DES'':

Thanks, committed in r248656.

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 All that I will do, has been done, All that I have, has not.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


compilation error with WITHOUT_ED_CRYPTO

2013-03-22 Thread deeptech71

/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
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org