summaryrefslogtreecommitdiff
path: root/sys/src/cmd/mothra
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-08-01 14:55:33 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-08-01 14:55:33 +0200
commit71c57070c61d58f9ba41a511ed3790201bedead7 (patch)
tree273fa8b300878dea3ddffb2f49d0b41ecf81b0e2 /sys/src/cmd/mothra
parentfe5ede9792e3b4bbed05c10c534c8050e4208233 (diff)
mothra: enable compiler warnings and type checking, cleanup
Diffstat (limited to 'sys/src/cmd/mothra')
-rw-r--r--sys/src/cmd/mothra/forms.c3
-rw-r--r--sys/src/cmd/mothra/getpix.c2
-rw-r--r--sys/src/cmd/mothra/html.h4
-rw-r--r--sys/src/cmd/mothra/mkfile2
-rw-r--r--sys/src/cmd/mothra/mothra.c7
-rw-r--r--sys/src/cmd/mothra/rdhtml.c8
6 files changed, 13 insertions, 13 deletions
diff --git a/sys/src/cmd/mothra/forms.c b/sys/src/cmd/mothra/forms.c
index 3c8a8fd48..39afa62d4 100644
--- 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 @@ char *seloption(Field *f){
}
void mkfieldpanel(Rtext *t){
Action *a;
- Panel *win, *scrl, *menu, *pop, *button;
+ Panel *win, *scrl;
Field *f;
if((a = t->user) == nil)
diff --git a/sys/src/cmd/mothra/getpix.c b/sys/src/cmd/mothra/getpix.c
index 0ab52afc5..ed4a71b0b 100644
--- a/sys/src/cmd/mothra/getpix.c
+++ b/sys/src/cmd/mothra/getpix.c
@@ -23,7 +23,6 @@ char *pixcmd[]={
};
void getimage(Rtext *t, Www *w){
- int pfd[2];
Action *ap;
Url *url;
Image *b;
@@ -64,6 +63,7 @@ void getimage(Rtext *t, Www *w){
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;
}
diff --git a/sys/src/cmd/mothra/html.h b/sys/src/cmd/mothra/html.h
index b32dd0b5c..7393f6e6f 100644
--- a/sys/src/cmd/mothra/html.h
+++ b/sys/src/cmd/mothra/html.h
@@ -225,3 +225,7 @@ void endform(Hglob *);
char *pl_getattr(Pair *, char *);
int pl_hasattr(Pair *, char *);
void pl_htmloutput(Hglob *, int, char *, Field *);
+
+#pragma incomplete Form
+#pragma incomplete Field
+
diff --git a/sys/src/cmd/mothra/mkfile b/sys/src/cmd/mothra/mkfile
index da9a2f23b..1340e43ce 100644
--- a/sys/src/cmd/mothra/mkfile
+++ b/sys/src/cmd/mothra/mkfile
@@ -16,7 +16,7 @@ HFILES=mothra.h html.h libpanel/panel.h libpanel/rtext.h
BIN=/$objtype/bin
</sys/src/cmd/mkone
-CFLAGS=-Dplan9 -Ilibpanel
+CFLAGS=-FTVw -Ilibpanel
$LIB:V:
cd libpanel
diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c
index ddc696738..0a6407231 100644
--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -297,8 +297,6 @@ void main(int argc, char *argv[]){
Event e;
enum { Eplumb = 128, Ekick = 256 };
Plumbmsg *pm;
- Www *new;
- Action *a;
char *url;
int i;
@@ -577,7 +575,7 @@ char *arg(char *s){
}
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 @@ Url* selurl(char *urlname){
* 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 paste(Panel *p){
}
void hit3(int button, int item){
char name[NNAME];
- char file[128];
Panel *swap;
int fd;
USED(button);
diff --git a/sys/src/cmd/mothra/rdhtml.c b/sys/src/cmd/mothra/rdhtml.c
index c347701db..12f2a7f3f 100644
--- a/sys/src/cmd/mothra/rdhtml.c
+++ b/sys/src/cmd/mothra/rdhtml.c
@@ -317,10 +317,8 @@ char *linkify(char *s){
* 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 @@ int pl_getcomment(Hglob *g){
;
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 @@ void plrdplain(char *name, int fd, Www *dst){
finish(dst);
}
void plrdhtml(char *name, int fd, Www *dst){
- int t, tagerr;
+ int tagerr;
Stack *sp;
char buf[20];
char *str;