fontconfig: Branch 'master'

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

 



 test/test-bz1744377.c    |    4 ++--
 test/test-conf.c         |    6 +++---
 test/test-crbug1004254.c |    2 +-
 test/test-issue107.c     |   18 +++++++++---------
 test/test-issue180.c     |    4 ++--
 5 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 23ab038281fe59476a85bee02ad0ceb419095bdb
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Wed Nov 6 20:28:41 2019 +0900

    Fix gcc warnings with -Wpointer-sign
    
    Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/184

diff --git a/test/test-bz1744377.c b/test/test-bz1744377.c
index d7f1053..addd177 100644
--- a/test/test-bz1744377.c
+++ b/test/test-bz1744377.c
@@ -26,12 +26,12 @@
 int
 main (void)
 {
-    const FcChar8 *doc = ""
+    const FcChar8 *doc = (const FcChar8 *) ""
 	"<fontconfig>\n"
 	"  <include ignore_missing=\"yes\">blahblahblah</include>\n"
 	"</fontconfig>\n"
 	"";
-    const FcChar8 *doc2 = ""
+    const FcChar8 *doc2 = (const FcChar8 *) ""
 	"<fontconfig>\n"
 	"  <include ignore_missing=\"no\">blahblahblah</include>\n"
 	"</fontconfig>\n"
diff --git a/test/test-conf.c b/test/test-conf.c
index a8ff1bb..d4de21a 100644
--- a/test/test-conf.c
+++ b/test/test-conf.c
@@ -69,7 +69,7 @@ build_pattern (json_object *obj)
 	}
 	else if (json_object_get_type (iter.val) == json_type_string)
 	{
-	    const FcConstant *c = FcNameGetConstant (json_object_get_string (iter.val));
+		const FcConstant *c = FcNameGetConstant ((const FcChar8 *) json_object_get_string (iter.val));
 	    FcBool b;
 
 	    if (c)
@@ -95,7 +95,7 @@ build_pattern (json_object *obj)
 	    else
 	    {
 		v.type = FcTypeString;
-		v.u.s = json_object_get_string (iter.val);
+		v.u.s = (const FcChar8 *) json_object_get_string (iter.val);
 	    }
 	}
 	else if (json_object_get_type (iter.val) == json_type_null)
@@ -445,7 +445,7 @@ load_config (FcConfig *config, char *file)
     fread (buf, (size_t)len, sizeof (char), fp);
     buf[len] = 0;
 
-    ret = FcConfigParseAndLoadFromMemory (config, buf, FcTrue);
+    ret = FcConfigParseAndLoadFromMemory (config, (const FcChar8 *) buf, FcTrue);
 bail1:
     fclose (fp);
     if (buf)
diff --git a/test/test-crbug1004254.c b/test/test-crbug1004254.c
index 1cc6fc7..16dd3eb 100644
--- a/test/test-crbug1004254.c
+++ b/test/test-crbug1004254.c
@@ -39,7 +39,7 @@ run_query (void)
     FcPattern *pat = FcPatternCreate (), *match;
     FcResult result;
 
-    FcPatternAddString (pat, FC_FAMILY, "sans-serif");
+    FcPatternAddString (pat, FC_FAMILY, (const FcChar8 *) "sans-serif");
     FcPatternAddBool (pat, FC_SCALABLE, FcTrue);
     FcConfigSubstitute (NULL, pat, FcMatchPattern);
     FcDefaultSubstitute (pat);
diff --git a/test/test-issue107.c b/test/test-issue107.c
index bc2ee25..e22c35f 100644
--- a/test/test-issue107.c
+++ b/test/test-issue107.c
@@ -183,7 +183,7 @@ main(void)
     char *sysroot = NULL, systempl[512] = "/tmp/fc107-XXXXXX";
     FcChar8 *d = NULL, *dd = NULL;
     FcCache *c = NULL;
-    const FcChar8 *doc = ""
+    const FcChar8 *doc = (const FcChar8 *) ""
 	"<fontconfig>\n"
 	"  <dir>%s</dir>\n"
 	"</fontconfig>\n"
@@ -208,16 +208,16 @@ main(void)
     retval++;
     fprintf (stderr, "D: Creating %s\n", basedir);
     mkdir_p (basedir);
-    len = strlen (doc) + strlen (basedir) + 1;
+    len = strlen ((const char *) doc) + strlen (basedir) + 1;
     dd = malloc (len);
-    snprintf (dd, len, doc, basedir);
+    snprintf ((char *) dd, len, (char *) doc, basedir);
     if (!FcConfigParseAndLoadFromMemory (cfg, dd, FcFalse))
     {
 	fprintf (stderr, "%s: Unable to load a config\n", basedir);
 	goto bail;
     }
     sleep (1);
-    c = FcDirCacheRead (basedir, FcFalse, cfg);
+    c = FcDirCacheRead ((const FcChar8 *) basedir, FcFalse, cfg);
     FcDirCacheUnload (c);
     sleep (1);
     retval++;
@@ -230,22 +230,22 @@ main(void)
     fprintf (stderr, "D: Creating %s\n", sysroot);
     mkdir_p (sysroot);
     retval++;
-    d = FcStrBuildFilename (sysroot, basedir, NULL);
+    d = FcStrBuildFilename ((const FcChar8 *) sysroot, basedir, NULL);
     fprintf (stderr, "D: Creating %s\n", d);
-    mkdir_p (d);
+    mkdir_p ((const char *) d);
     free (d);
     retval++;
     free (dd);
-    len = strlen (doc) + strlen (basedir) + 1;
+    len = strlen ((const char *) doc) + strlen (basedir) + 1;
     dd = malloc (len);
-    snprintf (dd, len, doc, basedir);
+    snprintf ((char *) dd, len, (char *) doc, basedir);
     if (!FcConfigParseAndLoadFromMemory (cfg, dd, FcFalse))
     {
 	fprintf (stderr, "%s: Unable to load a config\n", basedir);
 	goto bail;
     }
     sleep (1);
-    c = FcDirCacheRead (basedir, FcFalse, cfg);
+    c = FcDirCacheRead ((const FcChar8 *) basedir, FcFalse, cfg);
     FcDirCacheUnload (c);
     sleep (1);
     retval++;
diff --git a/test/test-issue180.c b/test/test-issue180.c
index 18a28d7..2832d3b 100644
--- a/test/test-issue180.c
+++ b/test/test-issue180.c
@@ -28,12 +28,12 @@
 int
 main (void)
 {
-    const FcChar8 *doc = ""
+    const FcChar8 *doc = (const FcChar8 *) ""
 	"<fontconfig>\n"
 	"  <cachedir></cachedir>\n"
 	"</fontconfig>\n"
 	"";
-    const FcChar8 *doc2 = ""
+    const FcChar8 *doc2 = (const FcChar8 *) ""
 	"<fontconfig>\n"
 	"  <cachedir prefix=\"xdg\"></cachedir>\n"
 	"</fontconfig>\n"
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux