1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-31 05:41:08 +00:00

Fix build error with clang.

This commit is contained in:
Vanilla I. Shu 2011-09-28 02:39:34 +00:00
parent cef71cc946
commit 4dab10ebdb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=282538
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,29 @@
--- graphic.c.orig 2011-09-28 10:01:08.000000000 +0800
+++ graphic.c 2011-09-28 10:01:57.000000000 +0800
@@ -748,7 +748,7 @@ grafinit (void)
&visualinfo))
{
error (ERROR, "Could not get any TrueColor visual");
- return;
+ return FALSE;
}
/* convert color masks in more convenient values */
@@ -790,7 +790,7 @@ grafinit (void)
sprintf (string, "Could not find foreground color '%s'\n",
background);
error (ERROR, string);
- return;
+ return FALSE;
}
forepixel =
rgb_to_pixel (best_match.red >> 8, best_match.green >> 8,
@@ -806,7 +806,7 @@ grafinit (void)
sprintf (string, "Could not find background color '%s'\n",
background);
error (ERROR, string);
- return;
+ return FALSE;
}
backpixel =
rgb_to_pixel (best_match.red >> 8, best_match.green >> 8,

View File

@ -0,0 +1,11 @@
--- main.c.orig 2011-09-28 10:00:33.000000000 +0800
+++ main.c 2011-09-28 10:00:52.000000000 +0800
@@ -2400,7 +2400,7 @@ find_interpreter (char *name) /* find in
if (try[to - from - 1] != '/')
strcat (try, "/");
strcat (try, name);
- if (f = fopen (try, "r"))
+ if ((f = fopen (try, "r")))
{
fclose (f);
return try;