Fix `-Wformat' compiler warnings. Problem reported by Priyesh kumar <priyeshkkumar@gmail.com> * src/base/ftoutln.c (FT_Outline_Decompose): Fix number of arguments to tracing macro. * src/bdf/bdfdrivr.c (bdf_cmap_char_next, bdf_get_bdf_property): Ditto. * src/cache/ftcbasic.c (ftc_basic_family_get_count): Ditto. Reformulate message. * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Ditto. * src/sfnt/sfwoff2.c (woff2_open_font): Ditto. Trace table offset, too. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Ditto.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
diff --git a/ChangeLog b/ChangeLog
index 70a0805..677c0b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2020-07-25 Werner Lemberg <wl@gnu.org>
+
+ Fix `-Wformat' compiler warnings.
+
+ Problem reported by Priyesh kumar <priyeshkkumar@gmail.com>
+
+ * src/base/ftoutln.c (FT_Outline_Decompose): Fix number of arguments
+ to tracing macro.
+
+ * src/bdf/bdfdrivr.c (bdf_cmap_char_next, bdf_get_bdf_property):
+ Ditto.
+
+ * src/cache/ftcbasic.c (ftc_basic_family_get_count): Ditto.
+ Reformulate message.
+
+ * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Ditto.
+
+ * src/sfnt/sfwoff2.c (woff2_open_font): Ditto.
+ Trace table offset, too.
+
+ * src/truetype/ttgxvar.c (ft_var_apply_tuple): Ditto.
+
2020-07-23 Werner Lemberg <wl@gnu.org>
* src/sfnt/sfwoff2.c (woff2_decompress): Fix compiler warning.
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index f449ee6..311f098 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -274,7 +274,7 @@
first = (FT_UInt)last + 1;
}
- FT_TRACE5(( "FT_Outline_Decompose: Done\n", n ));
+ FT_TRACE5(( "FT_Outline_Decompose: Done\n" ));
return FT_Err_Ok;
Invalid_Outline:
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index e338808..1adf3eb 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -183,7 +183,8 @@ THE SOFTWARE.
Exit:
if ( charcode > 0xFFFFFFFFUL )
{
- FT_TRACE1(( "bdf_cmap_char_next: charcode 0x%x > 32bit API" ));
+ FT_TRACE1(( "bdf_cmap_char_next: charcode 0x%lx > 32bit API",
+ charcode ));
*acharcode = 0;
/* XXX: result should be changed to indicate an overflow error */
}
@@ -901,7 +902,8 @@ THE SOFTWARE.
if ( prop->value.l > 0x7FFFFFFFL || prop->value.l < ( -1 - 0x7FFFFFFFL ) )
{
FT_TRACE1(( "bdf_get_bdf_property:"
- " too large integer 0x%x is truncated\n" ));
+ " too large integer 0x%lx is truncated\n",
+ prop->value.l ));
}
aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
aproperty->u.integer = (FT_Int32)prop->value.l;
@@ -911,7 +913,8 @@ THE SOFTWARE.
if ( prop->value.ul > 0xFFFFFFFFUL )
{
FT_TRACE1(( "bdf_get_bdf_property:"
- " too large cardinal 0x%x is truncated\n" ));
+ " too large cardinal 0x%lx is truncated\n",
+ prop->value.ul ));
}
aproperty->type = BDF_PROPERTY_TYPE_CARDINAL;
aproperty->u.cardinal = (FT_UInt32)prop->value.ul;
diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index 493fc0a..aa6e6a7 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -110,7 +110,9 @@
if ( (FT_ULong)face->num_glyphs > FT_UINT_MAX || 0 > face->num_glyphs )
FT_TRACE1(( "ftc_basic_family_get_count:"
- " too large number of glyphs in this face, truncated\n",
+ " the number of glyphs in this face is %ld,\n"
+ " "
+ " which is too much and thus truncated\n",
face->num_glyphs ));
if ( !error )
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index f68e60e..e9dd517 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -606,8 +606,9 @@ THE SOFTWARE.
if ( prop->value.l > 0x7FFFFFFFL ||
prop->value.l < ( -1 - 0x7FFFFFFFL ) )
{
- FT_TRACE1(( "pcf_get_bdf_property:" ));
- FT_TRACE1(( " too large integer 0x%x is truncated\n" ));
+ FT_TRACE1(( "pcf_get_bdf_property:"
+ " too large integer 0x%lx is truncated\n",
+ prop->value.l ));
}
/*
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index 30345c7..a26c711 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -1852,9 +1852,11 @@
FT_NEW_ARRAY( indices, woff2.num_tables ) )
goto Exit;
- FT_TRACE2(( "\n"
- " tag flags transform origLen transformLen\n"
- " --------------------------------------------------\n" ));
+ FT_TRACE2((
+ "\n"
+ " tag flags transform origLen transformLen offset\n"
+ " -----------------------------------------------------------\n" ));
+ /* " XXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX" */
for ( nn = 0; nn < woff2.num_tables; nn++ )
{
@@ -1924,7 +1926,7 @@
src_offset += table->TransformLength;
table->flags = flags;
- FT_TRACE2(( " %c%c%c%c %08d %08d %08ld %08ld\n",
+ FT_TRACE2(( " %c%c%c%c %08d %08d %08ld %08ld %08ld\n",
(FT_Char)( table->Tag >> 24 ),
(FT_Char)( table->Tag >> 16 ),
(FT_Char)( table->Tag >> 8 ),
@@ -1933,7 +1935,6 @@
( table->FlagByte >> 6 ) & 0x03,
table->dst_length,
table->TransformLength,
- table->src_length,
table->src_offset ));
indices[nn] = table;
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 22c7025..b462263 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -1729,7 +1729,7 @@
if ( tuple_coords[i] == 0 )
{
- FT_TRACE6(( " tuple coordinate is zero, ignore\n", i ));
+ FT_TRACE6(( " tuple coordinate is zero, ignore\n" ));
continue;
}