]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3152. [cleanup] Some versions of gcc and clang failed due to
authorEvan Hunt <each@isc.org>
Mon, 5 Sep 2011 18:00:22 +0000 (18:00 +0000)
committerEvan Hunt <each@isc.org>
Mon, 5 Sep 2011 18:00:22 +0000 (18:00 +0000)
incorrect use of __builtin_expect. [RT #25183]

CHANGES
bin/tests/cfg_test.c
lib/dns/dst_api.c
lib/isc/include/isc/util.h

diff --git a/CHANGES b/CHANGES
index 8db8e26479f75eed80efdd42ecbe2f1eb365cf15..997e7ee24e8f3afafa4870b79d61d966170ff5c1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3152.  [cleanup]       Some versions of gcc and clang failed due to
+                       incorrect use of __builtin_expect. [RT #25183]
+
 3151.  [bug]           Queries for type RRSIG or SIG could be handled
                         incorrectly.  [RT #21050]
 
index 74bad5a4a4301621de91de197a6cb59061e7bf76..a6995c0a9b5b3e4eaf1cb235cecebd27b969c424 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: cfg_test.c,v 1.23 2010/01/11 23:48:37 tbox Exp $ */
+/* $Id: cfg_test.c,v 1.24 2011/09/05 18:00:22 each Exp $ */
 
 /*! \file */
 
@@ -49,7 +49,7 @@ check_result(isc_result_t result, const char *format, ...) {
 static void
 output(void *closure, const char *text, int textlen) {
        UNUSED(closure);
-       (void) isc_util_fwrite(text, 1, textlen, stdout);
+       (void) fwrite(text, 1, textlen, stdout);
 }
 
 static void
index 1cf2ef38e04e73669fb88e377a5f46accf4fbf06..47d18a181f7061867ad7b6a1dc9913e5abe79f77 100644 (file)
@@ -31,7 +31,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.63 2011/08/18 23:46:34 tbox Exp $
+ * $Id: dst_api.c,v 1.64 2011/09/05 18:00:22 each Exp $
  */
 
 /*! \file */
@@ -1579,7 +1579,7 @@ write_public_key(const dst_key_t *key, int type, const char *directory) {
                fprintf(fp, "%d ", key->key_ttl);
 
        isc_buffer_usedregion(&classb, &r);
-       if ((unsigned)isc_util_fwrite(r.base, 1, r.length, fp) != r.length)
+       if ((unsigned) fwrite(r.base, 1, r.length, fp) != r.length)
               ret = DST_R_WRITEERROR;
 
        if ((type & DST_TYPE_KEY) != 0)
@@ -1588,7 +1588,7 @@ write_public_key(const dst_key_t *key, int type, const char *directory) {
                fprintf(fp, " DNSKEY ");
 
        isc_buffer_usedregion(&textb, &r);
-       if ((unsigned)isc_util_fwrite(r.base, 1, r.length, fp) != r.length)
+       if ((unsigned) fwrite(r.base, 1, r.length, fp) != r.length)
               ret = DST_R_WRITEERROR;
 
        fputc('\n', fp);
index ee5ef72838f9d285115cd0f1185cf57090840828..12a0440e1d6714f00de6594df3762dc517f56239 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: util.h,v 1.34 2011/03/12 04:59:49 tbox Exp $ */
+/* $Id: util.h,v 1.35 2011/09/05 18:00:22 each Exp $ */
 
 #ifndef ISC_UTIL_H
 #define ISC_UTIL_H 1
  */
 #define TIME_NOW(tp)   RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS)
 
-/*%
- * Prevent Linux spurious warnings
- */
-#if defined(__GNUC__) && (__GNUC__ > 3)
-#define isc_util_fwrite(a, b, c, d)    \
-       __builtin_expect(fwrite((a), (b), (c), (d)), (c))
-#else
-#define isc_util_fwrite(a, b, c, d)    fwrite((a), (b), (c), (d))
-#endif
-
 #endif /* ISC_UTIL_H */