freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 4eb6cb881: Fix warnings for CMake Unity builds.


From: Werner Lemberg
Subject: [freetype2] master 4eb6cb881: Fix warnings for CMake Unity builds.
Date: Mon, 27 Dec 2021 01:50:34 -0500 (EST)

branch: master
commit 4eb6cb8818057a022f97176b53738ee3098c8eb6
Author: Alexander Borsuk <me@alex.bio>
Commit: Werner Lemberg <wl@gnu.org>

    Fix warnings for CMake Unity builds.
    
    * src/cache/ftcbasic.c (FT_COMPONENT): Undefine macro before redefinition.
    * src/smooth/ftgrays.c (TRUNC, FRACT): Ditto.
---
 src/cache/ftcbasic.c | 1 +
 src/smooth/ftgrays.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index 1760c5fbd..731038314 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -26,6 +26,7 @@
 #include "ftccback.h"
 #include "ftcerror.h"
 
+#undef  FT_COMPONENT
 #define FT_COMPONENT  cache
 
 
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index d982c2820..5d5d016e9 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -333,7 +333,9 @@ typedef ptrdiff_t  FT_PtrDist;
 #define PIXEL_BITS  8
 
 #define ONE_PIXEL       ( 1 << PIXEL_BITS )
+#undef TRUNC
 #define TRUNC( x )      (TCoord)( (x) >> PIXEL_BITS )
+#undef FRACT
 #define FRACT( x )      (TCoord)( (x) & ( ONE_PIXEL - 1 ) )
 
 #if PIXEL_BITS >= 6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]