]> granicus.if.org Git - libexpat/commitdiff
xmlparse.c: Address compile warning with -DNDEBUG (issue #76)
authorSebastian Pipping <sebastian@pipping.org>
Wed, 12 Jul 2017 18:20:22 +0000 (20:20 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Wed, 12 Jul 2017 18:20:22 +0000 (20:20 +0200)
expat/Changes
expat/lib/xmlparse.c

index 1fb0226e494007bc29ac53e67bb4fbd8e66cea34..e8be7c4e1a15ea973377660093c0ec1135689be5 100644 (file)
@@ -34,6 +34,7 @@ Release 2.2.2 Wed July 12 2017
              #72  CMake: Ease use of Expat in context of a parent project
                     with multipe CMakeLists.txt files
              #72  CMake: Resolve mistaken executable permissions
+             #76  Address compile warning with -DNDEBUG (not recommended!)
 
         Special thanks to:
             Alexander Bluhm
@@ -42,6 +43,7 @@ Release 2.2.2 Wed July 12 2017
             Kerin Millar
             László Böszörményi
             S. P. Zeidler
+            Segev Finer
             Václav Slavík
             Victor Stinner
             Viktor Szakats
index 0d423cb2faa765d508bc9a4f4ecb47939f6f6d91..9f121a683ee83032b3829a8863eb30269c0ce7db 100644 (file)
@@ -815,7 +815,12 @@ gather_time_entropy(void)
   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;