Goto WARNS 5 with assorted changes.
This commit is contained in:
parent
0f9d3dba37
commit
adb72768ea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107954
@ -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
|
||||
|
||||
|
@ -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}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user