3152. [cleanup] Some versions of gcc and clang failed due to

incorrect use of __builtin_expect. [RT #25183]
This commit is contained in:
Evan Hunt
2011-09-05 18:00:22 +00:00
parent 6010c10f1f
commit 76a7d4e152
4 changed files with 9 additions and 16 deletions

View 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
@@ -235,14 +235,4 @@
*/
#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 */