qa: build everything with -Werror

This commit is contained in:
Giacomo Tesio 2017-01-10 01:37:55 +01:00
parent 51d12f1f34
commit e93aafc028
54 changed files with 58 additions and 145 deletions

View File

@ -14,6 +14,7 @@
"-O0",
"-static",
"-Wall",
"-Werror",
"-Wno-main",
"-Wno-missing-braces",
"-Wno-parentheses",

View File

@ -3,9 +3,6 @@
"Include": [
"/sys/src/cmd/cmd.json"
],
"CFlags": [
"-Werror"
],
"Projects": [
"win/"
],

View File

@ -3,9 +3,6 @@
"Include": [
"/sys/src/cmd/cmd.json"
],
"CFlags": [
"-Werror"
],
"Install": "/arch/$ARCH/aux/acme/",
"Program": "win",
"SourceFiles": [

View File

@ -3,9 +3,6 @@
"Include": [
"/sys/src/cmd/cmd.json"
],
"CFlags": [
"-Werror"
],
"Install": "/arch/$ARCH/cmd/",
"Program": "acme",
"SourceFiles": [

View File

@ -11,8 +11,7 @@
"git clean -xdf ./"
],
"Cflags": [
"-DYYMALLOC=malloc",
"-Werror"
"-DYYMALLOC=malloc"
],
"Install": "/arch/$ARCH/cmd/",
"Program": "awk",

View File

@ -16,6 +16,8 @@
#include "dosfs.h"
#include "fns.h"
extern int putlongname(Xfs *xf, Dosptr *ndp, char *name, char sname[13]);
void
rversion(void)
{

View File

@ -19,14 +19,14 @@
static Iotrack hiob[HIOB+1]; /* hash buckets + lru list */
static Iotrack iobuf[NIOBUF]; /* the real ones */
#define UNLINK(p, nx, pr) ((p)->pr->nx = (p)->nx, (p)->nx->pr = (p)->pr)
#define UNLINK(p, nx, pr) {(p)->pr->nx = (p)->nx; (p)->nx->pr = (p)->pr;}
#define LINK(h, p, nx, pr) ((p)->nx = (h)->nx, (p)->pr = (h), \
(h)->nx->pr = (p), (h)->nx = (p))
#define LINK(h, p, nx, pr) {(p)->nx = (h)->nx; (p)->pr = (h), \
(h)->nx->pr = (p); (h)->nx = (p);}
#define HTOFRONT(h, p) ((h)->hnext != (p) && (UNLINK(p,hnext,hprev), LINK(h,p,hnext,hprev)))
#define HTOFRONT(h, p) if((h)->hnext != (p)) { UNLINK(p,hnext,hprev); LINK(h,p,hnext,hprev); }
#define TOFRONT(h, p) ((h)->next != (p) && (UNLINK(p, next, prev), LINK(h,p, next, prev)))
#define TOFRONT(h, p) if((h)->next != (p)) { UNLINK(p, next, prev); LINK(h,p, next, prev); }
Iosect *
getsect(Xfs *xf, int32_t addr)

View File

@ -19,14 +19,16 @@ static Xfs *xhead;
static Xfile *xfiles[FIDMOD], *freelist;
static MLock xlock, xlocks[FIDMOD], freelock;
#if 0
static int
okmode(int omode, int fmode)
{
if(omode == OREAD)
return fmode & 4;
/* else ORDWR */
return (fmode & 6) == 6;
return (fmode & ORDWR) == ORDWR;
}
#endif
Xfs *
getxfs(char *user, char *name)
@ -56,7 +58,7 @@ getxfs(char *user, char *name)
offset = 0;
if(p = strrchr(name, ':')){
*p++ = 0;
offset = strtol(p, (const char **)&q, 0);
offset = strtol(p, &q, 0);
chat("name %s, offset %ld\n", p, offset);
if(offset < 0 || p == q){
errno = Enofilsys;

View File

@ -77,8 +77,8 @@ fcmp(const void *va, const void *vb)
Re **aa, **bb;
Re *a, *b;
aa = va;
bb = vb;
aa = (Re **)va;
bb = (Re **)vb;
a = *aa;
b = *bb;
if (a > b)
@ -199,7 +199,7 @@ int
pcmp(const void *va, const void *vb)
{
int n;
Rune *a, *b;
const Rune *a, *b;
a = va;
b = vb;

View File

@ -1,8 +1,5 @@
{
"Console": {
"Cflags": [
"-Werror"
],
"Include": [
"/arch/$ARCH/include/cflags.json"
],

View File

@ -1,8 +1,5 @@
{
"PipeConsole": {
"Cflags": [
"-Werror"
],
"Include": [
"/arch/$ARCH/include/cflags.json"
],

View File

@ -1,8 +1,5 @@
{
"ScreenConsole": {
"Cflags": [
"-Werror"
],
"Include": [
"/arch/$ARCH/include/cflags.json"
],

View File

@ -66,6 +66,7 @@ tvp3026xi(uint8_t index)
return r;
}
#if 0
static void
tvp3026o(uint8_t reg, uint8_t data)
{
@ -74,6 +75,7 @@ tvp3026o(uint8_t reg, uint8_t data)
crt55 = tvp3026io(reg, data);
vgaxo(Crtx, 0x55, crt55);
}
#endif
void
tvp3026xo(uint8_t index, uint8_t data)
@ -125,6 +127,7 @@ init(Vga* vga, Ctlr* ctlr)
ctlr->flag |= Finit;
}
#if 0
static void
load(Vga* vga, Ctlr* ctlr)
{
@ -147,6 +150,7 @@ load(Vga* vga, Ctlr* ctlr)
ctlr->flag |= Fload;
}
#endif
static void
dump(Vga* vga, Ctlr* ctlr)

View File

@ -282,6 +282,7 @@ static Flag capabilityflag[] = {
0
};
#if 0
static Flag modeattributesflags[] = {
1<<0, "supported",
1<<2, "tty",
@ -310,6 +311,7 @@ static Flag directcolorflags[] = {
1<<1, "x-usable",
0
};
#endif
static char *modelstr[] = {
"text", "cga", "hercules", "planar", "packed", "non-chain4", "direct", "YUV"

View File

@ -200,12 +200,13 @@ options(Vga* vga, Ctlr* ctlr)
ctlr->flag |= Hlinear|Henhanced|Foptions;
}
#if 0
static void
clock(Vga* vga, Ctlr* ctlr)
{
/* BEST CLOCK ROUTINE EVER! */
}
#endif
static void
init(Vga* vga, Ctlr* ctlr)

View File

@ -55,7 +55,7 @@ stmt: expr { code(xpop); }
| RETURN expr
{ defnonly("return"); $$=$2; code(funcret); }
| PROCEDURE begin '(' arglist ')'
{ $$ = $2; code3(call, (Inst)$1, (Inst)$4); }
{ $$ = $2; code3(call, (Inst)$1, (Inst)(uintptr_t)$4); }
| PRINT prlist { $$ = $2; }
| while '(' cond ')' stmt end {
($1)[1] = (Inst)$5; /* body of loop */
@ -94,7 +94,7 @@ expr: NUMBER { $$ = code2(constpush, (Inst)$1); }
| VAR { $$ = code3(varpush, (Inst)$1, eval); }
| asgn
| FUNCTION begin '(' arglist ')'
{ $$ = $2; code3(call,(Inst)$1,(Inst)$4); }
{ $$ = $2; code3(call,(Inst)$1,(Inst)(uintptr_t)$4); }
| READ '(' VAR ')' { $$ = code2(varread, (Inst)$3); }
| BLTIN '(' expr ')' { $$=$3; code2(bltin, (Inst)$1->u.ptr); }
| '(' expr ')' { $$ = $2; }

View File

@ -55,6 +55,8 @@ void diag(Node*, char*, ...);
void com(Node*);
void fcom(Node*,Node*,Node*);
int yylex(void);
#pragma varargck argpos cprint 1
#pragma varargck argpos diag 2

View File

@ -10,9 +10,6 @@
"yacc -d syn.y",
"cp y.tab.h x.tab.h"
],
"Cflags": [
"-Wl,--verbose"
],
"Install": "/arch/$ARCH/cmd/",
"Program": "rc",
"SourceFiles": [

View File

@ -1,8 +1,7 @@
{
"Libusb": {
"Cflags": [
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"/sys/src/lib/lib.json"

View File

@ -9,7 +9,7 @@ fi
cd $JEHANNE/sys/src/kern/amd64
gcc -c -O0 -static -fplan9-extensions -mno-red-zone -ffreestanding -fno-builtin -mcmodel=kernel l64sipi.S
ld -Ttext 0x00003000 l64sipi.o -o l64sipi
ld -Ttext 0x00003000 -e 0x00003000 l64sipi.o -o l64sipi
objcopy -O binary -j .text l64sipi l64sipi.out
echo 'uint8_t sipihandler[]={' > sipi.h

View File

@ -21,7 +21,7 @@
#define __ASSEMBLER__
#endif
.section .text, "awx"
.section .text
/*
* Real mode. Welcome to 1978.

View File

@ -1,7 +1,6 @@
{
"lib9p": {
"Cflags": [
"-Werror",
"-DPORTABLE_SYSCALLS"
],
"Include": [

View File

@ -1,8 +1,7 @@
{
"9p2000": {
"Cflags": [
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"../lib.json"

View File

@ -1,8 +1,7 @@
{
"9p2000": {
"Cflags": [
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"../klib.json"

View File

@ -1,8 +1,5 @@
{
"libString": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,7 @@
{
"Libaml": {
"Cflags": [
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"../lib.json"

View File

@ -1,8 +1,7 @@
{
"KernelLibaml": {
"Cflags": [
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"../klib.json"

View File

@ -1,8 +1,5 @@
{
"libauth": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libauthsrv": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libavl": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libbio": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,7 @@
{
"CrtFiles": {
"Cflags": [
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"../lib.json"
@ -18,8 +17,7 @@
},
"Libc": {
"Cflags": [
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"../lib.json"

View File

@ -2,8 +2,7 @@
"KernelLibc": {
"Cflags": [
"-DKERNEL",
"-fasm",
"-Werror"
"-fasm"
],
"Include": [
"../klib.json"

View File

@ -1,8 +1,5 @@
{
"libcomplete": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libcontrol": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libdisk": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"Libdraw": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"KernelLibdraw": {
"Cflags": [
"-Werror"
],
"Include": [
"../klib.json"
],

View File

@ -1,8 +1,5 @@
{
"libflate": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libframe": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"Libip": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"KernelLibip": {
"Cflags": [
"-Werror"
],
"Include": [
"../klib.json"
],

View File

@ -1,8 +1,5 @@
{
"Libip": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -10,6 +10,7 @@
"-fstack-protector-all",
"-fno-builtin",
"-Wall",
"-Werror",
"-Wno-missing-braces",
"-Wno-parentheses",
"-Wno-unknown-pragmas",

View File

@ -1,8 +1,5 @@
{
"libmemdraw": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"KernelLibmemdraw": {
"Cflags": [
"-Werror"
],
"Include": [
"../klib.json"
],

View File

@ -1,8 +1,5 @@
{
"libmemlayer": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"KernelLibmemlayer": {
"Cflags": [
"-Werror"
],
"Include": [
"../klib.json"
],

View File

@ -1,8 +1,5 @@
{
"libplumb": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libregexp": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -4,8 +4,7 @@
"../lib.json"
],
"Cflags": [
"-I../mp/port/",
"-Werror"
"-I../mp/port/"
],
"Install": "/arch/$ARCH/lib/",
"Library": "libsec.a",

View File

@ -4,8 +4,7 @@
"../klib.json"
],
"Cflags": [
"-I../mp/port/",
"-Werror"
"-I../mp/port/"
],
"Install": "/arch/$ARCH/lib/",
"Library": "klibsec.a",

View File

@ -1,8 +1,5 @@
{
"libstdio": {
"Cflags": [
"-Werror"
],
"Include": [
"../lib.json"
],

View File

@ -1,8 +1,5 @@
{
"libthread": {
"Cflags": [
"-Werror"
],
"Include": [
"/arch/$ARCH/include/cflags.json",
"../lib.json"