Permalink
Browse files

shortcut_to_name should not be defined as static in a header file. Put

it in group.c where it it used most, and add an extern definition for
the other users of it.

Found by gcc -Wall. ok okan@
  • Loading branch information...
1 parent dcfae16 commit d1050afb6001ef6134b816b21867466195153ecb oga committed Jan 11, 2009
Showing with 6 additions and 7 deletions.
  1. +1 −5 calmwm.h
  2. +5 −0 group.c
  3. +0 −2 parse.y
View
@@ -140,11 +140,7 @@ struct client_ctx {
TAILQ_HEAD(client_ctx_q, client_ctx);
-static char *shortcut_to_name[] = {
- "nogroup", "one", "two", "three",
- "four", "five", "six", "seven",
- "eight", "nine"
-};
+extern const char *shortcut_to_name[];
struct group_ctx {
TAILQ_ENTRY(group_ctx) entry;
View
@@ -29,6 +29,11 @@ struct group_ctx Groups[CALMWM_NGROUPS];
int Grouphideall = 0;
struct group_ctx_q Groupq;
+const char *shortcut_to_name[] = {
+ "nogroup", "one", "two", "three", "four", "five", "six",
+ "seven", "eight", "nine"
+};
+
static void
_group_add(struct group_ctx *gc, struct client_ctx *cc)
{
View
@@ -54,8 +54,6 @@ int findeol(void);
static struct conf *conf;
-extern char *shortcut_to_name[];
-
typedef struct {
union {
int64_t number;

0 comments on commit d1050af

Please sign in to comment.