Author: truckman
Date: Fri Aug  5 05:49:46 2016
New Revision: 1755245

URL: http://svn.apache.org/viewvc?rev=1755245&view=rev
Log:
Fix --enable-debug build with clang as the compiler.
 
Clang warns about this expression in graphite:
        if (!m_srAttachTo == 0)
Operator precedence rules require this to be evaluated as:
        if ((!m_srAttachTo) == 0)
but clang worries that the author might have intended this to mean:
        if (!(m_srAttachTo == 0))
Fortunately these two are equivalent, as is:
        if (m_srAttachTo != 0)
and the latter is much easier for humans to understand.

For some reason, --enable-debug adds -Werror to the graphite CFLAGS even
though its makefile.mk specifies:
        EXTERNAL_WARNINGS_NOT_ERRORS := TRUE


Modified:
    openoffice/trunk/main/graphite/graphite-2.3.1.patch

Modified: openoffice/trunk/main/graphite/graphite-2.3.1.patch
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/graphite/graphite-2.3.1.patch?rev=1755245&r1=1755244&r2=1755245&view=diff
==============================================================================
--- openoffice/trunk/main/graphite/graphite-2.3.1.patch (original)
+++ openoffice/trunk/main/graphite/graphite-2.3.1.patch Fri Aug  5 05:49:46 2016
@@ -2452,3 +2452,15 @@
        bool operator!=(const GlyphSetIterator & rhs) const throw()     { 
return !(*this == rhs); }
  
        // Random access iterator requirements
+diff -ur misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.h 
misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h
+--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.h    2009-01-27 
18:01:29.000000000 -0800
++++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h      
2016-08-02 17:22:26.300396000 -0700
+@@ -481,7 +481,7 @@
+               {
+                       Assert(false);  // Should have already been set in 
HandleModifiedPosition,
+                                                       // but just in case.
+-                      if (!m_srAttachTo == 0)
++                      if (m_srAttachTo != 0)
+                               return 0;
+                       else
+                               m_mAttachAtX = 0; // attach on the right


Reply via email to