Added more -Wfoo-bar-baz flags.

This commit is contained in:
Kris Maglione 2007-05-24 17:42:33 -04:00
parent 3b31f2bcca
commit f9a94a516a
11 changed files with 34 additions and 24 deletions

View File

@ -29,7 +29,7 @@ fatal(const char *fmt, ...) {
}
/* Can't malloc */
void
static void
mfatal(char *name, uint size) {
const char
couldnot[] = ": fatal: Could not ",

View File

@ -275,7 +275,7 @@ frame_hints(Frame *f, Rectangle r, Align sticky) {
return rectaddpt(r, p);
}
void
static void
set_client_state(Client * c, int state) {
long data[] = { state, None };
changeprop(&c->w, "WM_STATE", "WM_STATE", data, nelem(data));
@ -734,6 +734,7 @@ static Handlers handlers = {
};
/* Other */
#if 0 /* Not used at the moment */
void
newcol_client(Client *c, char *arg) {
Frame *f;
@ -763,6 +764,7 @@ newcol_client(Client *c, char *arg) {
return;
flushevents(EnterWindowMask, False);
}
#endif
void
update_client_views(Client *c, char **tags) {

View File

@ -97,13 +97,13 @@ drawimg(Image *img, ulong cbg, ulong cborder) {
drawpoly(img, pt, nelem(pt), CapNotLast, 1, cborder);
}
void
static void
drawdiv(Divide *d) {
copyimage(d->w, divimg->r, divimg, ZP);
setshapemask(d->w, divmask, ZP);
}
void
static void
update_imgs(void) {
Divide *d;
int w, h;

View File

@ -168,6 +168,7 @@ int eqrect(Rectangle, Rectangle);
int eqpt(Point, Point);
Point addpt(Point, Point);
Point subpt(Point, Point);
Point mulpt(Point p, Point q);
Point divpt(Point, Point);
Rectangle insetrect(Rectangle, int);
Rectangle rectaddpt(Rectangle, Point);

View File

@ -183,7 +183,7 @@ write_buf(Ixp9Req *r, char *buf, uint len) {
}
/* This should be moved to libixp */
void
static void
write_to_buf(Ixp9Req *r, void *buf, uint *len, uint max) {
uint offset, count;
@ -210,7 +210,7 @@ write_to_buf(Ixp9Req *r, void *buf, uint *len, uint max) {
}
/* This should be moved to libixp */
void
static void
data_to_cstring(Ixp9Req *r) {
char *p;
uint i;
@ -227,7 +227,7 @@ data_to_cstring(Ixp9Req *r) {
typedef char* (*MsgFunc)(void*, Message*);
char *
static char *
message(Ixp9Req *r, MsgFunc fn) {
char *err, *s, *p, c;
FileId *f;
@ -258,7 +258,7 @@ message(Ixp9Req *r, MsgFunc fn) {
return err;
}
void
static void
respond_event(Ixp9Req *r) {
FileId *f = r->fid->aux;
if(f->p.buf) {
@ -445,7 +445,7 @@ LastItem:
return ret;
}
Bool
static Bool
verify_file(FileId *f) {
FileId *nf;
@ -525,7 +525,7 @@ fs_walk(Ixp9Req *r) {
respond(r, nil);
}
uint
static uint
fs_size(FileId *f) {
switch(f->tab.type) {
default:

View File

@ -4,6 +4,7 @@
#include <string.h>
#include <util.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 */

View File

@ -374,7 +374,7 @@ gethsep(Rectangle r) {
return w;
}
void
static void
mouse_resizecolframe(Frame *f, Align align) {
WinAttr wa;
XEvent ev;

View File

@ -60,7 +60,7 @@ struct Pair {
static char* sep = " ";
char *
static char *
search(Pair *lst, int key, char *(*def)(int)) {
for(; lst->val; lst++)
if(lst->key == key)
@ -70,7 +70,7 @@ search(Pair *lst, int key, char *(*def)(int)) {
static char buffer[512];
char *
static char*
unmask(Pair * list, uint val)
{
Pair *p;

View File

@ -86,13 +86,13 @@ char **labels; /* list of labels and commands */
char **commands;
int numitems;
void usage();
void run_menu();
void create_window();
void redraw();
void warpmouse();
void memory();
int args();
void usage(void);
void run_menu(void);
void create_window(int, int);
void redraw(int, int);
void warpmouse(int, int);
void memory(void);
int args(void);
/* args --- go through the argument list, set options */
@ -110,7 +110,7 @@ struct {
{0, },
}, *ap;
ulong
static ulong
getcolor(char *name, ulong def) {
if((name != nil)
&& (XParseColor(dpy, defcmap, name, &color) != 0)
@ -238,7 +238,7 @@ main(int argc, char **argv)
/* usage --- print a usage message and die */
void
usage()
usage(void)
{
fprintf(stderr, "usage: %s [-display <displayname>] [-font <fontname>] ", progname);
fprintf(stderr, "[-{n,s}{f,b} <color>] [-br <color>] ");
@ -249,7 +249,7 @@ usage()
/* run_menu --- put up the window, execute selected commands */
void
run_menu()
run_menu(void)
{
XEvent ev;
int i, old, wide, high, dx, dy;

View File

@ -12,7 +12,7 @@
static IxpClient *client;
static void
usage() {
usage(void) {
fprintf(stderr,
"usage: %1$s [-a <address>] {create | read | ls [-ld] | remove | rm | write} <file>\n"
" %1$s [-a <address>] xwrite <file> <data>\n"

View File

@ -9,3 +9,9 @@ CFLAGS += \
-Wno-sign-compare \
-Wno-uninitialized \
-Wno-unused-parameter \
-Wimplicit \
-Wreturn-type \
-Wtrigraphs \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wpointer-arith \