rbb 2002/11/23 21:18:24
Modified: test mod_test.c testdso.c Log: Remove the rest of the warnings from the test suite. Revision Changes Path 1.6 +58 -1 apr/test/mod_test.c Index: mod_test.c =================================================================== RCS file: /home/cvs/apr/test/mod_test.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_test.c 23 Nov 2002 21:53:00 -0000 1.5 +++ mod_test.c 24 Nov 2002 05:18:23 -0000 1.6 @@ -1,4 +1,61 @@ -#include <stdio.h> +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2000-2002 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact [EMAIL PROTECTED] + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + */ + +#include "apr_strings.h" + +void print_hello(char str[256]); +int count_reps(int reps); void print_hello(char str[256]) { 1.24 +12 -12 apr/test/testdso.c Index: testdso.c =================================================================== RCS file: /home/cvs/apr/test/testdso.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- testdso.c 24 Nov 2002 04:57:35 -0000 1.23 +++ testdso.c 24 Nov 2002 05:18:23 -0000 1.24 @@ -58,6 +58,10 @@ #include "apr_pools.h" #include "apr_errno.h" #include "apr_dso.h" +#include "apr.h" +#ifdef APR_HAVE_UNISTD_H +#include <unistd.h> +#endif #ifdef NETWARE # define LIB_NAME "mod_test.nlm" @@ -78,7 +82,7 @@ static char *filename; static char *filename2; -void test_load_module(CuTest *tc) +static void test_load_module(CuTest *tc) { apr_dso_handle_t *h = NULL; apr_status_t status; @@ -91,7 +95,7 @@ apr_dso_unload(h); } -void test_dso_sym(CuTest *tc) +static void test_dso_sym(CuTest *tc) { apr_dso_handle_t *h = NULL; apr_dso_handle_sym_t func1 = NULL; @@ -115,13 +119,12 @@ apr_dso_unload(h); } -void test_dso_sym_return_value(CuTest *tc) +static void test_dso_sym_return_value(CuTest *tc) { apr_dso_handle_t *h = NULL; apr_dso_handle_sym_t func1 = NULL; apr_status_t status; int (*function)(int); - char teststr[256]; char errstr[256]; status = apr_dso_load(&h, filename, p); @@ -139,7 +142,7 @@ apr_dso_unload(h); } -void test_unload_module(CuTest *tc) +static void test_unload_module(CuTest *tc) { apr_dso_handle_t *h = NULL; apr_status_t status; @@ -158,7 +161,7 @@ } -void test_load_non_module(CuTest *tc) +static void test_load_non_module(CuTest *tc) { #ifndef LIB_NAME2 CuNotImpl(tc, "Can't load non-module library"); @@ -175,7 +178,7 @@ #endif } -void test_dso_sym_non_module(CuTest *tc) +static void test_dso_sym_non_module(CuTest *tc) { #ifndef LIB_NAME2 CuNotImpl(tc, "Can't load non-module library"); @@ -203,7 +206,7 @@ #endif } -void test_dso_sym_return_value_non_mod(CuTest *tc) +static void test_dso_sym_return_value_non_mod(CuTest *tc) { #ifndef LIB_NAME2 CuNotImpl(tc, "Can't load non-module library"); @@ -212,7 +215,6 @@ apr_dso_handle_sym_t func1 = NULL; apr_status_t status; int (*function)(int); - char teststr[256]; char errstr[256]; status = apr_dso_load(&h, filename2, p); @@ -231,7 +233,7 @@ #endif } -void test_unload_non_module(CuTest *tc) +static void test_unload_non_module(CuTest *tc) { #ifndef LIB_NAME2 CuNotImpl(tc, "Can't load non-module library"); @@ -256,9 +258,7 @@ static void test_load_notthere(CuTest *tc) { apr_dso_handle_t *h = NULL; - apr_dso_handle_sym_t func1 = NULL; apr_status_t status; - char errstr[256]; status = apr_dso_load(&h, "No_File.so", p); CuAssertIntEquals(tc, APR_EDSOOPEN, status);
