[or-cvs] r8312: Try to appease some warnings with newer gccs that believe th (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Thu Aug 31 18:47:55 UTC 2006


Author: nickm
Date: 2006-08-31 14:47:54 -0400 (Thu, 31 Aug 2006)
New Revision: 8312

Modified:
   tor/trunk/
   tor/trunk/src/common/crypto.c
   tor/trunk/src/common/tortls.c
Log:
 r8696 at Kushana:  nickm | 2006-08-31 14:43:44 -0400
 Try to appease some warnings with newer gccs that believe that ignoring a return value is okay, but casting a return value and then ignoring it is a sign of madness.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r8696] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/common/crypto.c
===================================================================
--- tor/trunk/src/common/crypto.c	2006-08-31 18:46:46 UTC (rev 8311)
+++ tor/trunk/src/common/crypto.c	2006-08-31 18:47:54 UTC (rev 8312)
@@ -503,12 +503,7 @@
   }
 
   BIO_get_mem_ptr(b, &buf);
-  BIO_set_close(b, BIO_NOCLOSE); /* so BIO_free doesn't free buf */
-  /* XXX The above line generates a warning on new gcc/openssls:
-   * crypto.c:506: warning: value computed is not used
-   * Perhaps in new openssls this is a more complex macro and
-   * we're no longer calling it quite right? -RD
-   */
+  (void)BIO_set_close(b, BIO_NOCLOSE); /* so BIO_free doesn't free buf */
   BIO_free(b);
 
   tor_assert(buf->length >= 0);

Modified: tor/trunk/src/common/tortls.c
===================================================================
--- tor/trunk/src/common/tortls.c	2006-08-31 18:46:46 UTC (rev 8311)
+++ tor/trunk/src/common/tortls.c	2006-08-31 18:47:54 UTC (rev 8312)
@@ -692,7 +692,7 @@
   BIO_get_mem_ptr(bio, &buf);
   s1 = tor_strndup(buf->data, buf->length);
 
-  BIO_reset(bio);
+  (void)BIO_reset(bio);
   if (!(ASN1_TIME_print(bio, X509_get_notAfter(cert)))) {
     tls_log_errors(LOG_WARN, "printing certificate lifetime");
     goto end;



More information about the tor-commits mailing list