summaryrefslogtreecommitdiffstats
path: root/tools/regression
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-12-16 22:35:56 +0000
committerphk <phk@FreeBSD.org>2002-12-16 22:35:56 +0000
commit1f7478c2704e04f73129945a43efabc4c9a62c91 (patch)
tree7300672af42dd5d60a550ee01a8386af188e0d65 /tools/regression
parentcd9caf5281a974ce67d8a16653a7751319c598f0 (diff)
downloadFreeBSD-src-1f7478c2704e04f73129945a43efabc4c9a62c91.zip
FreeBSD-src-1f7478c2704e04f73129945a43efabc4c9a62c91.tar.gz
Goto WARNS 5 with assorted changes.
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/geom/GLib/Makefile5
-rw-r--r--tools/regression/geom/Test/Makefile.inc6
-rw-r--r--tools/regression/geom/geom.c4
-rw-r--r--tools/regression/geom/geom_kernsim.c4
-rw-r--r--tools/regression/geom/geom_sim.h24
-rw-r--r--tools/regression/geom/geom_simdev.c6
-rw-r--r--tools/regression/geom/geom_simdisk.c10
-rw-r--r--tools/regression/geom/geom_simdisk.h2
-rw-r--r--tools/regression/geom/geom_simdisk_xml.c4
9 files changed, 32 insertions, 33 deletions
diff --git a/tools/regression/geom/GLib/Makefile b/tools/regression/geom/GLib/Makefile
index 01d9836..121ff6a 100644
--- a/tools/regression/geom/GLib/Makefile
+++ b/tools/regression/geom/GLib/Makefile
@@ -9,14 +9,13 @@ SRCS= geom.c geom_aes.c geom_bsd.c geom_simdev.c geom_dump.c \
geom_sunlabel.c geom_pc98.c
-CFLAGS += -g -static -W -Wall
-CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
+CFLAGS += -gstabs -static
CFLAGS += -I/usr/src/sys -I..
CFLAGS += -DKERNELSIM
NOPIC = static
NOPROFILE = bingo
NOOBJ = youbet
-WARNS = 0
+WARNS = 5
.PATH: /sys/geom .. /sys/kern
diff --git a/tools/regression/geom/Test/Makefile.inc b/tools/regression/geom/Test/Makefile.inc
index 99f344b..0f99550 100644
--- a/tools/regression/geom/Test/Makefile.inc
+++ b/tools/regression/geom/Test/Makefile.inc
@@ -3,14 +3,14 @@
PROG = testprg
NOMAN = no
NOOBJ = youbet
-CFLAGS += -g -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Wpointer-arith -static -I/usr/src/sys -I../..
+CFLAGS += -gstabs -static
+CFLAGS += -I/usr/src/sys -I../..
CFLAGS += -DKERNELSIM -pthread
LDADD += -L../../GLib -lG
LDADD += -lbsdxml
DPADD += ../../GLib/libG.a
CLEANFILES += _* *.core
-WARNS= 2
+WARNS= 5
foo:
echo ${SRCS}
diff --git a/tools/regression/geom/geom.c b/tools/regression/geom/geom.c
index a09cb9a..68217b8 100644
--- a/tools/regression/geom/geom.c
+++ b/tools/regression/geom/geom.c
@@ -49,7 +49,7 @@
#include <geom/geom_int.h>
void
-conff(char *file)
+conff(const char *file)
{
FILE *f;
char *s;
@@ -172,7 +172,7 @@ main(int argc __unused, char **argv __unused)
}
void
-sdumpf(char *file)
+sdumpf(const char *file)
{
FILE *f;
char *s;
diff --git a/tools/regression/geom/geom_kernsim.c b/tools/regression/geom/geom_kernsim.c
index 7b92578..8b05154 100644
--- a/tools/regression/geom/geom_kernsim.c
+++ b/tools/regression/geom/geom_kernsim.c
@@ -173,7 +173,7 @@ rattle()
void
-new_thread(void *(*func)(void *arg), char *name)
+new_thread(void *(*func)(void *arg), const char *name)
{
struct thread *tp;
static int nextt;
@@ -183,7 +183,7 @@ new_thread(void *(*func)(void *arg), char *name)
error = pthread_create(&tp->tid, NULL, func, tp);
if (error)
err(1, "pthread_create(%s)", name);
- tp->name = name;
+ tp->name = strdup(name);
printf("New Thread %d %s %p %d\n", tp - thr, name, tp, tp->pid);
}
diff --git a/tools/regression/geom/geom_sim.h b/tools/regression/geom/geom_sim.h
index 1c98a99..37d7afc 100644
--- a/tools/regression/geom/geom_sim.h
+++ b/tools/regression/geom/geom_sim.h
@@ -80,8 +80,8 @@ int biowait(struct bio *bp, const char *wchan);
/* geom_dev.c */
void g_dev_init(void *junk);
-struct g_consumer *g_dev_opendev(char *name, int w, int r, int e);
-int g_dev_request(char *name, struct bio *bp);
+struct g_consumer *g_dev_opendev(const char *name, int w, int r, int e);
+int g_dev_request(const char *name, struct bio *bp);
/* geom_kernsim.c */
struct thread {
@@ -101,7 +101,7 @@ int tsleep __P((void *chan, int pri, const char *wmesg, int timo));
#define PPAUSE 0
extern int hz;
-void new_thread(void *(*func)(void *arg), char *name);
+void new_thread(void *(*func)(void *arg), const char *name);
extern int bootverbose;
#define KASSERT(cond, txt) do {if (!(cond)) {printf txt; conff("err"); abort();}} while(0)
@@ -131,12 +131,12 @@ void g_topology_assert(void);
/* geom_simdisk.c */
void g_simdisk_init(void);
-void g_simdisk_destroy(char *);
-struct g_geom *g_simdisk_new(char *, char *);
-struct g_geom * g_simdisk_xml_load(char *name, char *file);
-void g_simdisk_xml_save(char *name, char *file);
-void g_simdisk_stop(char *name);
-void g_simdisk_restart(char *name);
+void g_simdisk_destroy(const char *);
+struct g_geom *g_simdisk_new(const char *, const char *);
+struct g_geom * g_simdisk_xml_load(const char *name, const char *file);
+void g_simdisk_xml_save(const char *name, const char *file);
+void g_simdisk_stop(const char *name);
+void g_simdisk_restart(const char *name);
#define DECLARE_GEOM_CLASS(class, name) \
void name##_init(void); \
@@ -156,9 +156,9 @@ void g_pc98_init(void);
void *thread_sim(void *ptr);
-void dumpf(char *file);
-void conff(char *file);
-void sdumpf(char *file);
+void dumpf(const char *file);
+void conff(const char *file);
+void sdumpf(const char *file);
#define THR_MAIN 0
#define THR_UP 1
diff --git a/tools/regression/geom/geom_simdev.c b/tools/regression/geom/geom_simdev.c
index 2b51806..4221742 100644
--- a/tools/regression/geom/geom_simdev.c
+++ b/tools/regression/geom/geom_simdev.c
@@ -97,7 +97,7 @@ static struct g_class dev_class = {
};
static struct g_geom *
-g_dev_findg(char *name)
+g_dev_findg(const char *name)
{
struct g_geom *gp;
@@ -116,7 +116,7 @@ g_dev_init(void *junk __unused)
struct g_consumer *
-g_dev_opendev(char *name, int r, int w, int e)
+g_dev_opendev(const char *name, int r, int w, int e)
{
struct g_geom *gp;
struct g_consumer *cp;
@@ -146,7 +146,7 @@ g_dev_done(struct bio *bp)
}
int
-g_dev_request(char *name, struct bio *bp)
+g_dev_request(const char *name, struct bio *bp)
{
struct g_geom *gp;
diff --git a/tools/regression/geom/geom_simdisk.c b/tools/regression/geom/geom_simdisk.c
index 39b27bb..ed9ed1f 100644
--- a/tools/regression/geom/geom_simdisk.c
+++ b/tools/regression/geom/geom_simdisk.c
@@ -121,7 +121,7 @@ g_simdisk_init(void)
}
struct g_geom *
-g_simdisk_create(char *name, struct simdisk_softc *sc)
+g_simdisk_create(const char *name, struct simdisk_softc *sc)
{
struct g_geom *gp;
struct g_provider *pp;
@@ -144,7 +144,7 @@ g_simdisk_create(char *name, struct simdisk_softc *sc)
}
struct g_geom *
-g_simdisk_new(char *name, char *path)
+g_simdisk_new(const char *name, const char *path)
{
struct simdisk_softc *sc;
struct stat st;
@@ -163,7 +163,7 @@ g_simdisk_new(char *name, char *path)
}
void
-g_simdisk_destroy(char *name)
+g_simdisk_destroy(const char *name)
{
struct g_geom *gp;
@@ -220,7 +220,7 @@ g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp)
}
void
-g_simdisk_stop(char *name)
+g_simdisk_stop(const char *name)
{
struct g_geom *gp;
struct simdisk_softc *sc;
@@ -236,7 +236,7 @@ g_simdisk_stop(char *name)
}
void
-g_simdisk_restart(char *name)
+g_simdisk_restart(const char *name)
{
struct g_geom *gp;
struct simdisk_softc *sc;
diff --git a/tools/regression/geom/geom_simdisk.h b/tools/regression/geom/geom_simdisk.h
index 7b01678..de4d0fb 100644
--- a/tools/regression/geom/geom_simdisk.h
+++ b/tools/regression/geom/geom_simdisk.h
@@ -59,6 +59,6 @@ struct simdisk_softc {
extern struct g_class g_simdisk_class;
struct sector * g_simdisk_findsector(struct simdisk_softc *sc, off_t off, int create);
-struct g_geom *g_simdisk_create(char *name, struct simdisk_softc *sc);
+struct g_geom *g_simdisk_create(const char *name, struct simdisk_softc *sc);
void g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp);
diff --git a/tools/regression/geom/geom_simdisk_xml.c b/tools/regression/geom/geom_simdisk_xml.c
index 818b9d2..47dcea5 100644
--- a/tools/regression/geom/geom_simdisk_xml.c
+++ b/tools/regression/geom/geom_simdisk_xml.c
@@ -55,7 +55,7 @@
#include "geom_simdisk.h"
void
-g_simdisk_xml_save(char *name, char *file)
+g_simdisk_xml_save(const char *name, const char *file)
{
struct g_geom *gp;
struct simdisk_softc *sc;
@@ -211,7 +211,7 @@ characterData(void *userData, const XML_Char *s, int len)
}
struct g_geom *
-g_simdisk_xml_load(char *name, char *file)
+g_simdisk_xml_load(const char *name, const char *file)
{
XML_Parser parser = XML_ParserCreate(NULL);
struct stat st;
OpenPOWER on IntegriCloud