mothra: enable compiler warnings and type checking, cleanup

This commit is contained in:
cinap_lenrek 2015-08-01 14:55:33 +02:00
parent fe5ede9792
commit 71c57070c6
6 changed files with 13 additions and 13 deletions

View file

@ -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)

View file

@ -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;
}

View file

@ -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

View file

@ -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

View file

@ -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);

View file

@ -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;