Bug 1374012 - Update to Expat 2.2.1. Part 2b: cherry-pick compilation fix from 2.2.2. r=erahm, a=RyanVM
authorPeter Van der Beken <peterv@propagandism.org>
Thu, 27 Dec 2018 15:13:11 +0000
changeset 509228 e1a947b12b5838f7e26204130a743a57526a2303
parent 509227 5b520a6d247e72fa614ae92b792d2c345f293461
child 509229 17e8d96276c7ebb7653008b1786de8fb17e681ab
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm, RyanVM
bugs1374012
milestone65.0
Bug 1374012 - Update to Expat 2.2.1. Part 2b: cherry-pick compilation fix from 2.2.2. r=erahm, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D14441
parser/expat/lib/xmlparse.c
--- a/parser/expat/lib/xmlparse.c
+++ b/parser/expat/lib/xmlparse.c
@@ -790,17 +790,22 @@ gather_time_entropy(void)
   FILETIME ft;
   GetSystemTimeAsFileTime(&ft); /* never fails */
   return ft.dwHighDateTime ^ ft.dwLowDateTime;
 #else
   struct timeval tv;
   int gettimeofday_res;
 
   gettimeofday_res = gettimeofday(&tv, NULL);
+
+#if defined(NDEBUG)
+  (void)gettimeofday_res;
+#else
   assert (gettimeofday_res == 0);
+#endif /* defined(NDEBUG) */
 
   /* Microseconds time is <20 bits entropy */
   return tv.tv_usec;
 #endif
 }
 
 #if defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_LIBBSD)
 # include <bsd/stdlib.h>