mirror of
https://github.com/golang/go
synced 2024-11-12 10:30:23 -07:00
cmd/dist: add -Wstrict-prototypes to CFLAGS and fix all the compiler errors
Plan 9 compilers insist this but as we don't have Plan 9 builders, we'd better let gcc check the prototypes. Inspired by CL 7289050. R=golang-dev, seed, dave, rsc, lucio.dere CC=akumar, golang-dev https://golang.org/cl/7288056
This commit is contained in:
parent
dff017ea99
commit
255fb521da
@ -84,7 +84,7 @@ void cgen_dcl(Node*);
|
|||||||
int needconvert(Type*, Type*);
|
int needconvert(Type*, Type*);
|
||||||
void genconv(Type*, Type*);
|
void genconv(Type*, Type*);
|
||||||
void allocparams(void);
|
void allocparams(void);
|
||||||
void checklabels();
|
void checklabels(void);
|
||||||
void ginscall(Node*, int);
|
void ginscall(Node*, int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -80,7 +80,7 @@ void cgen_dcl(Node*);
|
|||||||
int needconvert(Type*, Type*);
|
int needconvert(Type*, Type*);
|
||||||
void genconv(Type*, Type*);
|
void genconv(Type*, Type*);
|
||||||
void allocparams(void);
|
void allocparams(void);
|
||||||
void checklabels();
|
void checklabels(void);
|
||||||
void ginscall(Node*, int);
|
void ginscall(Node*, int);
|
||||||
int gen_as_init(Node*);
|
int gen_as_init(Node*);
|
||||||
void clearslim(Node*);
|
void clearslim(Node*);
|
||||||
|
@ -93,7 +93,7 @@ void cgen_dcl(Node*);
|
|||||||
int needconvert(Type*, Type*);
|
int needconvert(Type*, Type*);
|
||||||
void genconv(Type*, Type*);
|
void genconv(Type*, Type*);
|
||||||
void allocparams(void);
|
void allocparams(void);
|
||||||
void checklabels();
|
void checklabels(void);
|
||||||
void ginscall(Node*, int);
|
void ginscall(Node*, int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
3
src/cmd/dist/build.c
vendored
3
src/cmd/dist/build.c
vendored
@ -398,6 +398,9 @@ setup(void)
|
|||||||
// gccargs is the gcc command line to use for compiling a single C file.
|
// gccargs is the gcc command line to use for compiling a single C file.
|
||||||
static char *proto_gccargs[] = {
|
static char *proto_gccargs[] = {
|
||||||
"-Wall",
|
"-Wall",
|
||||||
|
// native Plan 9 compilers don't like non-standard prototypes
|
||||||
|
// so let gcc catch them.
|
||||||
|
"-Wstrict-prototypes",
|
||||||
"-Wno-sign-compare",
|
"-Wno-sign-compare",
|
||||||
"-Wno-missing-braces",
|
"-Wno-missing-braces",
|
||||||
"-Wno-parentheses",
|
"-Wno-parentheses",
|
||||||
|
@ -182,7 +182,7 @@ void Lflag(char *arg);
|
|||||||
void usage(void);
|
void usage(void);
|
||||||
void adddynrel(Sym*, Reloc*);
|
void adddynrel(Sym*, Reloc*);
|
||||||
void adddynrela(Sym*, Sym*, Reloc*);
|
void adddynrela(Sym*, Sym*, Reloc*);
|
||||||
Sym* lookuprel();
|
Sym* lookuprel(void);
|
||||||
void ldobj1(Biobuf *f, char*, int64 len, char *pn);
|
void ldobj1(Biobuf *f, char*, int64 len, char *pn);
|
||||||
void ldobj(Biobuf*, char*, int64, char*, int);
|
void ldobj(Biobuf*, char*, int64, char*, int);
|
||||||
void ldelf(Biobuf*, char*, int64, char*);
|
void ldelf(Biobuf*, char*, int64, char*);
|
||||||
|
@ -50,7 +50,7 @@ struct MachoDebug {
|
|||||||
uint32 filesize;
|
uint32 filesize;
|
||||||
};
|
};
|
||||||
|
|
||||||
MachoHdr* getMachoHdr();
|
MachoHdr* getMachoHdr(void);
|
||||||
MachoSeg* newMachoSeg(char*, int);
|
MachoSeg* newMachoSeg(char*, int);
|
||||||
MachoSect* newMachoSect(MachoSeg*, char*);
|
MachoSect* newMachoSect(MachoSeg*, char*);
|
||||||
MachoLoad* newMachoLoad(uint32, uint32);
|
MachoLoad* newMachoLoad(uint32, uint32);
|
||||||
|
@ -426,14 +426,14 @@ addppword(uvlong pc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
startpptrace()
|
startpptrace(void)
|
||||||
{
|
{
|
||||||
ppstart = nppdata;
|
ppstart = nppdata;
|
||||||
addppword(~0);
|
addppword(~0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
endpptrace()
|
endpptrace(void)
|
||||||
{
|
{
|
||||||
ppdata[ppstart] = nppdata-ppstart-1;
|
ppdata[ppstart] = nppdata-ppstart-1;
|
||||||
}
|
}
|
||||||
@ -644,7 +644,7 @@ compareleaf(const void *va, const void *vb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dumphistogram()
|
dumphistogram(void)
|
||||||
{
|
{
|
||||||
int i, h, n;
|
int i, h, n;
|
||||||
PC *x;
|
PC *x;
|
||||||
@ -699,7 +699,7 @@ struct Trace {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
dumppprof()
|
dumppprof(void)
|
||||||
{
|
{
|
||||||
uvlong i, n, *p, *e;
|
uvlong i, n, *p, *e;
|
||||||
int ntrace;
|
int ntrace;
|
||||||
|
@ -751,7 +751,7 @@ havet:
|
|||||||
static void*
|
static void*
|
||||||
excthread(void *v)
|
excthread(void *v)
|
||||||
{
|
{
|
||||||
extern boolean_t exc_server();
|
extern boolean_t exc_server(mach_msg_header_t *, mach_msg_header_t *);
|
||||||
mach_msg_server(exc_server, 2048, excport, 0);
|
mach_msg_server(exc_server, 2048, excport, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user