summaryrefslogtreecommitdiff
path: root/fc-match
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-07 15:33:12 -0500
committerMike Frysinger <vapier@gentoo.org>2012-02-21 14:15:58 -0500
commit01c833379e19d8f8752ac7cec15b179c71242e2c (patch)
treeb2edfa877e390e5b8ebc1197bab671c6afd8562c /fc-match
parent123d344f4590c45c5ccced8c46d157edb2b9efd2 (diff)
fc-{list,match}: constify format string
We don't free this string anywhere, so mark it const to avoid gcc warnings and possible bugs in the future (if people did try freeing it). fc-list.c: In function 'main': fc-list.c:161:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] fc-match.c: In function 'main': fc-match.c:201:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] fc-match.c:203:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'fc-match')
-rw-r--r--fc-match/fc-match.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fc-match/fc-match.c b/fc-match/fc-match.c
index 095dd4e..4642c8d 100644
--- a/fc-match/fc-match.c
+++ b/fc-match/fc-match.c
@@ -98,16 +98,16 @@ usage (char *program, int error)
int
main (int argc, char **argv)
{
- int verbose = 0;
- int sort = 0, all = 0;
- FcChar8 *format = NULL;
- int i;
- FcObjectSet *os = 0;
- FcFontSet *fs;
- FcPattern *pat;
- FcResult result;
+ int verbose = 0;
+ int sort = 0, all = 0;
+ const FcChar8 *format = NULL;
+ int i;
+ FcObjectSet *os = 0;
+ FcFontSet *fs;
+ FcPattern *pat;
+ FcResult result;
#if HAVE_GETOPT_LONG || HAVE_GETOPT
- int c;
+ int c;
#if HAVE_GETOPT_LONG
while ((c = getopt_long (argc, argv, "asvf:Vh", longopts, NULL)) != -1)
@@ -203,9 +203,9 @@ main (int argc, char **argv)
if (!format)
{
if (os)
- format = "%{=unparse}\n";
+ format = (const FcChar8 *) "%{=unparse}\n";
else
- format = "%{=fcmatch}\n";
+ format = (const FcChar8 *) "%{=fcmatch}\n";
}
if (fs)