From 768a340a15bd3bf200883e277f0a33de81d9a8e8 Mon Sep 17 00:00:00 2001 From: drl7x Date: Thu, 6 Mar 2003 06:20:48 +0000 Subject: [PATCH] Modified tests to account for bool being defined in the standard library. --- test/decl.c | 13 +++++++++++++ test/tests2.5/booltest.c | 4 ++-- test/utypes.c | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/test/decl.c b/test/decl.c index 1fc1c1d..82f9bcc 100644 --- a/test/decl.c +++ b/test/decl.c @@ -6,3 +6,16 @@ int main() int (**x)(int) = &y; x(10); /* called object is not a function */ } + +static /*@unused@*/ void foo1(void) +{ + int buf[10]; + buf[10] = 3; +} + + +static /*@unused@*/ void foo(void) +{ + float *array = NULL; + size_t /*@unused@*/ size = sizeof(array[0]); +} diff --git a/test/tests2.5/booltest.c b/test/tests2.5/booltest.c index 48fc58b..1c4e3eb 100644 --- a/test/tests2.5/booltest.c +++ b/test/tests2.5/booltest.c @@ -1,8 +1,8 @@ /* ** Boolean type checking */ - -typedef int bool; +// bool is now defined in the standard library +#include bool f (int i, bool b) { if (i) { /* error with -boolint -predboolint */ diff --git a/test/utypes.c b/test/utypes.c index 38cda60..1df654b 100644 --- a/test/utypes.c +++ b/test/utypes.c @@ -9,7 +9,7 @@ typedef unsigned long ulong; /* the platform), we have to take steps to prevent name clashes. */ /*** NOTE: This requires that you include std.h *before* any other ***/ /*** header file that includes sys/types.h. ***/ -#define bool bool_ /* (maybe not needed) */ +//#define bool bool_ / * (maybe not needed) * / #define uchar uchar_ #define uint uint_ #define ushort ushort_ -- 2.45.0