mirror of https://github.com/0intro/wmii
Added more -Wfoo-bar-baz flags.
This commit is contained in:
parent
3b31f2bcca
commit
f9a94a516a
|
@ -29,7 +29,7 @@ fatal(const char *fmt, ...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Can't malloc */
|
/* Can't malloc */
|
||||||
void
|
static void
|
||||||
mfatal(char *name, uint size) {
|
mfatal(char *name, uint size) {
|
||||||
const char
|
const char
|
||||||
couldnot[] = ": fatal: Could not ",
|
couldnot[] = ": fatal: Could not ",
|
||||||
|
|
|
@ -275,7 +275,7 @@ frame_hints(Frame *f, Rectangle r, Align sticky) {
|
||||||
return rectaddpt(r, p);
|
return rectaddpt(r, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
set_client_state(Client * c, int state) {
|
set_client_state(Client * c, int state) {
|
||||||
long data[] = { state, None };
|
long data[] = { state, None };
|
||||||
changeprop(&c->w, "WM_STATE", "WM_STATE", data, nelem(data));
|
changeprop(&c->w, "WM_STATE", "WM_STATE", data, nelem(data));
|
||||||
|
@ -734,6 +734,7 @@ static Handlers handlers = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Other */
|
/* Other */
|
||||||
|
#if 0 /* Not used at the moment */
|
||||||
void
|
void
|
||||||
newcol_client(Client *c, char *arg) {
|
newcol_client(Client *c, char *arg) {
|
||||||
Frame *f;
|
Frame *f;
|
||||||
|
@ -763,6 +764,7 @@ newcol_client(Client *c, char *arg) {
|
||||||
return;
|
return;
|
||||||
flushevents(EnterWindowMask, False);
|
flushevents(EnterWindowMask, False);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
update_client_views(Client *c, char **tags) {
|
update_client_views(Client *c, char **tags) {
|
||||||
|
|
|
@ -97,13 +97,13 @@ drawimg(Image *img, ulong cbg, ulong cborder) {
|
||||||
drawpoly(img, pt, nelem(pt), CapNotLast, 1, cborder);
|
drawpoly(img, pt, nelem(pt), CapNotLast, 1, cborder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
drawdiv(Divide *d) {
|
drawdiv(Divide *d) {
|
||||||
copyimage(d->w, divimg->r, divimg, ZP);
|
copyimage(d->w, divimg->r, divimg, ZP);
|
||||||
setshapemask(d->w, divmask, ZP);
|
setshapemask(d->w, divmask, ZP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
update_imgs(void) {
|
update_imgs(void) {
|
||||||
Divide *d;
|
Divide *d;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
|
@ -168,6 +168,7 @@ int eqrect(Rectangle, Rectangle);
|
||||||
int eqpt(Point, Point);
|
int eqpt(Point, Point);
|
||||||
Point addpt(Point, Point);
|
Point addpt(Point, Point);
|
||||||
Point subpt(Point, Point);
|
Point subpt(Point, Point);
|
||||||
|
Point mulpt(Point p, Point q);
|
||||||
Point divpt(Point, Point);
|
Point divpt(Point, Point);
|
||||||
Rectangle insetrect(Rectangle, int);
|
Rectangle insetrect(Rectangle, int);
|
||||||
Rectangle rectaddpt(Rectangle, Point);
|
Rectangle rectaddpt(Rectangle, Point);
|
||||||
|
|
|
@ -183,7 +183,7 @@ write_buf(Ixp9Req *r, char *buf, uint len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This should be moved to libixp */
|
/* This should be moved to libixp */
|
||||||
void
|
static void
|
||||||
write_to_buf(Ixp9Req *r, void *buf, uint *len, uint max) {
|
write_to_buf(Ixp9Req *r, void *buf, uint *len, uint max) {
|
||||||
uint offset, count;
|
uint offset, count;
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ write_to_buf(Ixp9Req *r, void *buf, uint *len, uint max) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This should be moved to libixp */
|
/* This should be moved to libixp */
|
||||||
void
|
static void
|
||||||
data_to_cstring(Ixp9Req *r) {
|
data_to_cstring(Ixp9Req *r) {
|
||||||
char *p;
|
char *p;
|
||||||
uint i;
|
uint i;
|
||||||
|
@ -227,7 +227,7 @@ data_to_cstring(Ixp9Req *r) {
|
||||||
|
|
||||||
typedef char* (*MsgFunc)(void*, Message*);
|
typedef char* (*MsgFunc)(void*, Message*);
|
||||||
|
|
||||||
char *
|
static char *
|
||||||
message(Ixp9Req *r, MsgFunc fn) {
|
message(Ixp9Req *r, MsgFunc fn) {
|
||||||
char *err, *s, *p, c;
|
char *err, *s, *p, c;
|
||||||
FileId *f;
|
FileId *f;
|
||||||
|
@ -258,7 +258,7 @@ message(Ixp9Req *r, MsgFunc fn) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
respond_event(Ixp9Req *r) {
|
respond_event(Ixp9Req *r) {
|
||||||
FileId *f = r->fid->aux;
|
FileId *f = r->fid->aux;
|
||||||
if(f->p.buf) {
|
if(f->p.buf) {
|
||||||
|
@ -445,7 +445,7 @@ LastItem:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
static Bool
|
||||||
verify_file(FileId *f) {
|
verify_file(FileId *f) {
|
||||||
FileId *nf;
|
FileId *nf;
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ fs_walk(Ixp9Req *r) {
|
||||||
respond(r, nil);
|
respond(r, nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint
|
static uint
|
||||||
fs_size(FileId *f) {
|
fs_size(FileId *f) {
|
||||||
switch(f->tab.type) {
|
switch(f->tab.type) {
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
#include "dat.h"
|
#include "dat.h"
|
||||||
|
#include "fns.h"
|
||||||
|
|
||||||
/* Edit s/^([a-zA-Z].*)\n([a-z].*) {/\1 \2;/g x/^([^a-zA-Z]|static|$)/-+d s/ (\*map|val|*str)//g */
|
/* Edit s/^([a-zA-Z].*)\n([a-z].*) {/\1 \2;/g x/^([^a-zA-Z]|static|$)/-+d s/ (\*map|val|*str)//g */
|
||||||
|
|
||||||
|
|
|
@ -374,7 +374,7 @@ gethsep(Rectangle r) {
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
mouse_resizecolframe(Frame *f, Align align) {
|
mouse_resizecolframe(Frame *f, Align align) {
|
||||||
WinAttr wa;
|
WinAttr wa;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
|
@ -60,7 +60,7 @@ struct Pair {
|
||||||
|
|
||||||
static char* sep = " ";
|
static char* sep = " ";
|
||||||
|
|
||||||
char *
|
static char *
|
||||||
search(Pair *lst, int key, char *(*def)(int)) {
|
search(Pair *lst, int key, char *(*def)(int)) {
|
||||||
for(; lst->val; lst++)
|
for(; lst->val; lst++)
|
||||||
if(lst->key == key)
|
if(lst->key == key)
|
||||||
|
@ -70,7 +70,7 @@ search(Pair *lst, int key, char *(*def)(int)) {
|
||||||
|
|
||||||
static char buffer[512];
|
static char buffer[512];
|
||||||
|
|
||||||
char *
|
static char*
|
||||||
unmask(Pair * list, uint val)
|
unmask(Pair * list, uint val)
|
||||||
{
|
{
|
||||||
Pair *p;
|
Pair *p;
|
||||||
|
|
|
@ -86,13 +86,13 @@ char **labels; /* list of labels and commands */
|
||||||
char **commands;
|
char **commands;
|
||||||
int numitems;
|
int numitems;
|
||||||
|
|
||||||
void usage();
|
void usage(void);
|
||||||
void run_menu();
|
void run_menu(void);
|
||||||
void create_window();
|
void create_window(int, int);
|
||||||
void redraw();
|
void redraw(int, int);
|
||||||
void warpmouse();
|
void warpmouse(int, int);
|
||||||
void memory();
|
void memory(void);
|
||||||
int args();
|
int args(void);
|
||||||
|
|
||||||
/* args --- go through the argument list, set options */
|
/* args --- go through the argument list, set options */
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ struct {
|
||||||
{0, },
|
{0, },
|
||||||
}, *ap;
|
}, *ap;
|
||||||
|
|
||||||
ulong
|
static ulong
|
||||||
getcolor(char *name, ulong def) {
|
getcolor(char *name, ulong def) {
|
||||||
if((name != nil)
|
if((name != nil)
|
||||||
&& (XParseColor(dpy, defcmap, name, &color) != 0)
|
&& (XParseColor(dpy, defcmap, name, &color) != 0)
|
||||||
|
@ -238,7 +238,7 @@ main(int argc, char **argv)
|
||||||
/* usage --- print a usage message and die */
|
/* usage --- print a usage message and die */
|
||||||
|
|
||||||
void
|
void
|
||||||
usage()
|
usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "usage: %s [-display <displayname>] [-font <fontname>] ", progname);
|
fprintf(stderr, "usage: %s [-display <displayname>] [-font <fontname>] ", progname);
|
||||||
fprintf(stderr, "[-{n,s}{f,b} <color>] [-br <color>] ");
|
fprintf(stderr, "[-{n,s}{f,b} <color>] [-br <color>] ");
|
||||||
|
@ -249,7 +249,7 @@ usage()
|
||||||
/* run_menu --- put up the window, execute selected commands */
|
/* run_menu --- put up the window, execute selected commands */
|
||||||
|
|
||||||
void
|
void
|
||||||
run_menu()
|
run_menu(void)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
int i, old, wide, high, dx, dy;
|
int i, old, wide, high, dx, dy;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
static IxpClient *client;
|
static IxpClient *client;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage() {
|
usage(void) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: %1$s [-a <address>] {create | read | ls [-ld] | remove | rm | write} <file>\n"
|
"usage: %1$s [-a <address>] {create | read | ls [-ld] | remove | rm | write} <file>\n"
|
||||||
" %1$s [-a <address>] xwrite <file> <data>\n"
|
" %1$s [-a <address>] xwrite <file> <data>\n"
|
||||||
|
|
Loading…
Reference in New Issue