Browse Source

Properly declare buf as extern and fix all unused-warnings

master
Laslo Hunhold 7 years ago
committed by Aaron Marcher
parent
commit
914440b4fc
No known key found for this signature in database GPG Key ID: 74B048E5C2474F9A
3 changed files with 6 additions and 3 deletions
  1. +1
    -1
      config.mk
  2. +4
    -1
      slstatus.c
  3. +1
    -1
      util.h

+ 1
- 1
config.mk View File

@@ -12,7 +12,7 @@ X11LIB = /usr/X11R6/lib


# flags # flags
CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Wno-unused -Os
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os
LDFLAGS = -L$(X11LIB) -s LDFLAGS = -L$(X11LIB) -s
LDLIBS = -lX11 LDLIBS = -lX11




+ 4
- 1
slstatus.c View File

@@ -10,6 +10,7 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>


#include "arg.h" #include "arg.h"
#include "slstatus.h"
#include "util.h" #include "util.h"


struct arg { struct arg {
@@ -19,15 +20,17 @@ struct arg {
}; };


char *argv0; char *argv0;
char buf[1024];
static unsigned short int done; static unsigned short int done;
static Display *dpy; static Display *dpy;


#include "slstatus.h"
#include "config.h" #include "config.h"


static void static void
terminate(const int signo) terminate(const int signo)
{ {
(void)signo;

done = 1; done = 1;
} }




+ 1
- 1
util.h View File

@@ -1,4 +1,4 @@
static char buf[1024];
extern char buf[1024];


#define LEN(x) (sizeof (x) / sizeof *(x)) #define LEN(x) (sizeof (x) / sizeof *(x))




Loading…
Cancel
Save