quickfast icon indicating copy to clipboard operation
quickfast copied to clipboard

sequence point warning in DataSource.h

Open GoogleCodeExporter opened this issue 10 years ago • 1 comments

gcc 4.7 was throwing a sequence point warning for one line in DataSource.h.  I 
guess it's confused about whether position_ should be incremented before or 
after the comparison.  Here's the patch to make it increment after:

diff --git a/src/external/quickfast/Codecs/DataSource.h 
b/src/external/quickfast/Codecs/DataSource.h
index 715bf64..e1ffb40 100644
--- a/src/external/quickfast/Codecs/DataSource.h
+++ b/src/external/quickfast/Codecs/DataSource.h
@@ -88,7 +88,8 @@ namespace QuickFAST{
           size_t end = position_ + used;
           while (position_ < end)
           {
-            doEcho(position_ < size_, buffer_[position_++]);
+            doEcho(position_ < size_, buffer_[position_]);
+            position_++;
           }
         }
         else


Original issue reported on code.google.com by [email protected] on 16 Jun 2012 at 2:35

GoogleCodeExporter avatar Apr 21 '15 11:04 GoogleCodeExporter

Thanks for the problem report and the patch.  I'll incorporate it.

Original comment by [email protected] on 3 Jul 2012 at 6:11

  • Changed state: Accepted

GoogleCodeExporter avatar Apr 21 '15 11:04 GoogleCodeExporter