Fix build warnings.

This commit is contained in:
Andrey Slusar 2006-04-14 21:54:10 +00:00
parent 4b78243bf4
commit 09bde4b032
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=159518
4 changed files with 131 additions and 4 deletions

View file

@ -1,13 +1,17 @@
$FreeBSD$
--- ../modules/corelib/corelib.mcf 2001/07/31 08:05:16 1.1
+++ ../modules/corelib/corelib.mcf 2001/07/31 08:07:40
@@ -27,6 +27,7 @@
(files alloc apply process)
--- ../modules/corelib/corelib.mcf.orig Wed Mar 24 22:38:27 2004
+++ ../modules/corelib/corelib.mcf Fri Apr 14 18:26:06 2006
@@ -27,9 +27,11 @@
(files alloc process)
(files dynstate)
(files string str2num num2str)
+ (require-c-header "<ctype.h>")
(files layer imageio intrglue)
(files linkinfo keywords)
(files complex rational basicnum)
+ (require-c-header "<math.h>")
(files delegate)
(export :local)
;;

View file

@ -0,0 +1,55 @@
--- ../modules/regex/runmatch.c.orig Fri Apr 14 17:27:56 2006
+++ ../modules/regex/runmatch.c Fri Apr 14 17:31:23 2006
@@ -130,7 +130,7 @@
{
UINT_8 reg = machine[pc++];
bound[reg].count++;
- printf( "-- [%02u] inc r%u [%u,%u] now %u\n",
+ printf( "-- [%02lu] inc r%u [%u,%u] now %u\n",
pc-2, reg, bound[reg].min, bound[reg].max,
bound[reg].count );
break;
@@ -149,28 +149,28 @@
save = bound[reg].count;
printf( "-- [%02u] <%p> boundloop r%u (count %u, [%u,%u])\n",
- pcsave, &subr, reg, save, bound[reg].min, bound[reg].max );
+ (unsigned int)pcsave, &subr, reg, save, bound[reg].min, bound[reg].max );
if (save < bound[reg].max) {
result = run_match( str, subr );
if (result) {
printf( "-- [%02u] <%p> boundloop run_match OK\n",
- pcsave, &subr );
+ (unsigned int)pcsave, &subr );
return result;
}
printf( "-- [%02u] <%p> boundloop run_match failed (fix n=%u)\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
bound[reg].count = save;
if (save < bound[reg].min) {
printf( "-- [%02u] <%p> boundloop total failure w/%u\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
FAILED;
}
printf( "-- [%02u] <%p> boundloop continue w/%u (no match)\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
} else {
printf( "-- [%02u] <%p> boundloop continue w/%u (hit max)\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
}
break;
}
@@ -185,7 +185,7 @@
bound[reg].max = (machine[pc+2] << 8) + machine[pc+3];
pc += 4;
printf( "-- [%02u] setbound r%u [%u,%u]\n",
- pcsave, reg, bound[reg].min, bound[reg].max );
+ (unsigned int)pcsave, reg, bound[reg].min, bound[reg].max );
break;
}

View file

@ -0,0 +1,13 @@
$FreeBSD$
--- ../stage0/corelib/complex.c.orig Fri Apr 14 18:22:39 2006
+++ ../stage0/corelib/complex.c Fri Apr 14 18:22:51 2006
@@ -12,6 +12,7 @@
#define _C_COMPLEX
#include "corelib_p.h"
#include <rscheme/vinsns.h>
+#include <math.h>
extern struct module_descr module_corelib;
extern struct part_descr corelib_part_complex;
static char sccsid[] = "@(#)corelib modules/corelib/complex.scm [191848459] (RS v0.7.3.3, 2005-06-13)";

View file

@ -0,0 +1,55 @@
--- ../stage0/regex/runmatch.c.orig Fri Apr 14 17:27:56 2006
+++ ../stage0/regex/runmatch.c Fri Apr 14 17:31:23 2006
@@ -130,7 +130,7 @@
{
UINT_8 reg = machine[pc++];
bound[reg].count++;
- printf( "-- [%02u] inc r%u [%u,%u] now %u\n",
+ printf( "-- [%02lu] inc r%u [%u,%u] now %u\n",
pc-2, reg, bound[reg].min, bound[reg].max,
bound[reg].count );
break;
@@ -149,28 +149,28 @@
save = bound[reg].count;
printf( "-- [%02u] <%p> boundloop r%u (count %u, [%u,%u])\n",
- pcsave, &subr, reg, save, bound[reg].min, bound[reg].max );
+ (unsigned int)pcsave, &subr, reg, save, bound[reg].min, bound[reg].max );
if (save < bound[reg].max) {
result = run_match( str, subr );
if (result) {
printf( "-- [%02u] <%p> boundloop run_match OK\n",
- pcsave, &subr );
+ (unsigned int)pcsave, &subr );
return result;
}
printf( "-- [%02u] <%p> boundloop run_match failed (fix n=%u)\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
bound[reg].count = save;
if (save < bound[reg].min) {
printf( "-- [%02u] <%p> boundloop total failure w/%u\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
FAILED;
}
printf( "-- [%02u] <%p> boundloop continue w/%u (no match)\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
} else {
printf( "-- [%02u] <%p> boundloop continue w/%u (hit max)\n",
- pcsave, &subr, save );
+ (unsigned int)pcsave, &subr, save );
}
break;
}
@@ -185,7 +185,7 @@
bound[reg].max = (machine[pc+2] << 8) + machine[pc+3];
pc += 4;
printf( "-- [%02u] setbound r%u [%u,%u]\n",
- pcsave, reg, bound[reg].min, bound[reg].max );
+ (unsigned int)pcsave, reg, bound[reg].min, bound[reg].max );
break;
}