ref: 71c57070c61d58f9ba41a511ed3790201bedead7
parent: fe5ede9792e3b4bbed05c10c534c8050e4208233
author: cinap_lenrek <[email protected]>
date: Sat Aug 1 10:55:33 EDT 2015
mothra: enable compiler warnings and type checking, cleanup
--- a/sys/src/cmd/mothra/forms.c
+++ b/sys/src/cmd/mothra/forms.c
@@ -3,6 +3,7 @@
#include <draw.h>
#include <event.h>
#include <panel.h>
+#include "rtext.h"
#include "mothra.h"
#include "html.h"
@@ -357,7 +358,7 @@
}
void mkfieldpanel(Rtext *t){
Action *a;
- Panel *win, *scrl, *menu, *pop, *button;
+ Panel *win, *scrl;
Field *f;
if((a = t->user) == nil)
--- a/sys/src/cmd/mothra/getpix.c
+++ b/sys/src/cmd/mothra/getpix.c
@@ -23,7 +23,6 @@
};
void getimage(Rtext *t, Www *w){
- int pfd[2];
Action *ap;
Url *url;
Image *b;
@@ -64,6 +63,7 @@
s += sprint(s, " -x %d", ap->width);
if(ap->height>0)
s += sprint(s, " -y %d", ap->height);
+ USED(s);
if((fd = pipeline(fd, buf)) < 0)
goto Err;
}
--- a/sys/src/cmd/mothra/html.h
+++ b/sys/src/cmd/mothra/html.h
@@ -225,3 +225,7 @@
char *pl_getattr(Pair *, char *);
int pl_hasattr(Pair *, char *);
void pl_htmloutput(Hglob *, int, char *, Field *);
+
+#pragma incomplete Form
+#pragma incomplete Field
+
--- a/sys/src/cmd/mothra/mkfile
+++ b/sys/src/cmd/mothra/mkfile
@@ -16,7 +16,7 @@
BIN=/$objtype/bin
</sys/src/cmd/mkone
-CFLAGS=-Dplan9 -Ilibpanel
+CFLAGS=-FTVw -Ilibpanel
$LIB:V:
cd libpanel
--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -297,8 +297,6 @@
Event e;
enum { Eplumb = 128, Ekick = 256 };
Plumbmsg *pm;
- Www *new;
- Action *a;
char *url;
int i;
@@ -577,7 +575,7 @@
}
void save(int ifd, char *name){
char buf[NNAME+64];
- int cfd, ofd;
+ int ofd;
if(ifd < 0){
message("save: %s: %r", name);
return;
@@ -972,7 +970,7 @@
* get the file at the given url
*/
void geturl(char *urlname, int post, int plumb, int map){
- int i, fd, typ, pfd[2];
+ int i, fd, typ;
char cmd[NNAME];
ulong n;
Www *w;
@@ -1168,7 +1166,6 @@
}
void hit3(int button, int item){
char name[NNAME];
- char file[128];
Panel *swap;
int fd;
USED(button);
--- a/sys/src/cmd/mothra/rdhtml.c
+++ b/sys/src/cmd/mothra/rdhtml.c
@@ -317,10 +317,8 @@
* This doesn't work if removing an entity reference can lengthen the string!
* Fortunately, this doesn't happen.
*/
-void pl_rmentities(Hglob *g, char *s){
+void pl_rmentities(Hglob *, char *s){
char *t, *u, c, svc;
- Entity *ep;
- Rune r;
t=s;
do{
c=*s++;
@@ -466,7 +464,7 @@
;
if(c==EOF)
break;
- if((c=pl_nextc(g))=='-'){
+ if(pl_nextc(g)=='-'){
while((c=pl_nextc(g))=='-')
;
if(c==ETAG || c==EOF)
@@ -693,7 +691,7 @@
finish(dst);
}
void plrdhtml(char *name, int fd, Www *dst){
- int t, tagerr;
+ int tagerr;
Stack *sp;
char buf[20];
char *str;