mirror of
https://github.com/golang/go
synced 2024-09-25 11:20:13 -06: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*);
|
||||
void genconv(Type*, Type*);
|
||||
void allocparams(void);
|
||||
void checklabels();
|
||||
void checklabels(void);
|
||||
void ginscall(Node*, int);
|
||||
|
||||
/*
|
||||
|
@ -80,7 +80,7 @@ void cgen_dcl(Node*);
|
||||
int needconvert(Type*, Type*);
|
||||
void genconv(Type*, Type*);
|
||||
void allocparams(void);
|
||||
void checklabels();
|
||||
void checklabels(void);
|
||||
void ginscall(Node*, int);
|
||||
int gen_as_init(Node*);
|
||||
void clearslim(Node*);
|
||||
|
@ -93,7 +93,7 @@ void cgen_dcl(Node*);
|
||||
int needconvert(Type*, Type*);
|
||||
void genconv(Type*, Type*);
|
||||
void allocparams(void);
|
||||
void checklabels();
|
||||
void checklabels(void);
|
||||
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.
|
||||
static char *proto_gccargs[] = {
|
||||
"-Wall",
|
||||
// native Plan 9 compilers don't like non-standard prototypes
|
||||
// so let gcc catch them.
|
||||
"-Wstrict-prototypes",
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-missing-braces",
|
||||
"-Wno-parentheses",
|
||||
|
@ -182,7 +182,7 @@ void Lflag(char *arg);
|
||||
void usage(void);
|
||||
void adddynrel(Sym*, Reloc*);
|
||||
void adddynrela(Sym*, Sym*, Reloc*);
|
||||
Sym* lookuprel();
|
||||
Sym* lookuprel(void);
|
||||
void ldobj1(Biobuf *f, char*, int64 len, char *pn);
|
||||
void ldobj(Biobuf*, char*, int64, char*, int);
|
||||
void ldelf(Biobuf*, char*, int64, char*);
|
||||
|
@ -50,7 +50,7 @@ struct MachoDebug {
|
||||
uint32 filesize;
|
||||
};
|
||||
|
||||
MachoHdr* getMachoHdr();
|
||||
MachoHdr* getMachoHdr(void);
|
||||
MachoSeg* newMachoSeg(char*, int);
|
||||
MachoSect* newMachoSect(MachoSeg*, char*);
|
||||
MachoLoad* newMachoLoad(uint32, uint32);
|
||||
|
@ -426,14 +426,14 @@ addppword(uvlong pc)
|
||||
}
|
||||
|
||||
void
|
||||
startpptrace()
|
||||
startpptrace(void)
|
||||
{
|
||||
ppstart = nppdata;
|
||||
addppword(~0);
|
||||
}
|
||||
|
||||
void
|
||||
endpptrace()
|
||||
endpptrace(void)
|
||||
{
|
||||
ppdata[ppstart] = nppdata-ppstart-1;
|
||||
}
|
||||
@ -644,7 +644,7 @@ compareleaf(const void *va, const void *vb)
|
||||
}
|
||||
|
||||
void
|
||||
dumphistogram()
|
||||
dumphistogram(void)
|
||||
{
|
||||
int i, h, n;
|
||||
PC *x;
|
||||
@ -699,7 +699,7 @@ struct Trace {
|
||||
};
|
||||
|
||||
void
|
||||
dumppprof()
|
||||
dumppprof(void)
|
||||
{
|
||||
uvlong i, n, *p, *e;
|
||||
int ntrace;
|
||||
|
@ -751,7 +751,7 @@ havet:
|
||||
static void*
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user