/[gentoo-x86]/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch
Gentoo

Contents of /x11-wm/musca/files/musca-0.9.24_p20100226-null.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Tue Jan 7 18:20:05 2014 UTC (6 years, 1 month ago) by jer
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-diff
Fix some coding issues.

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key A792A613)

1 https://bugs.launchpad.net/musca/+bug/1236500
2
3
4 --- a/musca.c
5 +++ b/musca.c
6 @@ -421,7 +421,7 @@
7 if (s->depth)
8 {
9 int *indexes = allocate(sizeof(int) * s->depth);
10 - int count = 0, i; Window *w;
11 + int count = 0, i; Window *w = NULL;
12 FOR_STACK (w, s, Window*, i)
13 {
14 note("%d", i);
15 @@ -1673,7 +1673,6 @@
16 frame *f = t->frames;
17 frame **group = NULL;
18 int i = 0, x, y, w, h;
19 - ubyte changes = 0;
20 if (direction == HORIZONTAL)
21 {
22 if (f->x + f->w >= t->head->screen->width - t->r)
23 @@ -1684,7 +1683,6 @@
24 group = frame_siblings(f, LEFT);
25 if (frame_siblings_growable(group, LEFT, size))
26 {
27 - changes = 1;
28 x = f->x - size; w = size; y = f->y; h = 0;
29 for (i = 0; group[i]; i++)
30 y = MIN(y, group[i]->y), h += group[i]->h;
31 @@ -1702,7 +1700,6 @@
32 group = frame_siblings(f, RIGHT);
33 if (frame_siblings_growable(group, RIGHT, size))
34 {
35 - changes = 1;
36 x = f->x + f->w; w = size; y = f->y; h = 0;
37 for (i = 0; group[i]; i++)
38 y = MIN(y, group[i]->y), h += group[i]->h;
39 @@ -1725,7 +1722,6 @@
40 group = frame_siblings(f, TOP);
41 if (frame_siblings_growable(group, TOP, size))
42 {
43 - changes = 1;
44 y = f->y - size; h = size; x = f->x; w = 0;
45 for (i = 0; group[i]; i++)
46 x = MIN(x, group[i]->x), w += group[i]->w;
47 @@ -1743,7 +1739,6 @@
48 group = frame_siblings(f, BOTTOM);
49 if (frame_siblings_growable(group, BOTTOM, size))
50 {
51 - changes = 1;
52 y = f->y + f->h; h = size; x = f->x; w = 0;
53 for (i = 0; group[i]; i++)
54 x = MIN(x, group[i]->x), w += group[i]->w;
55 @@ -2205,11 +2200,9 @@
56 char* com_frame_split(char *cmd, regmatch_t *subs)
57 {
58 group *g = heads->groups; frame *f = g->frames;
59 - int sw = heads->screen->width - g->l - g->r,
60 - sh = heads->screen->height - g->t - g->b;
61 char *mode = regsubstr(cmd, subs, 1);
62 - ucell fs = f->h, ss = sh; ubyte dir = VERTICAL;
63 - if (*mode == 'h') { fs = f->w; ss = sw; dir = HORIZONTAL; }
64 + ucell fs = f->h; ubyte dir = VERTICAL;
65 + if (*mode == 'h') { fs = f->w; dir = HORIZONTAL; }
66 dcell size = parse_size(cmd, subs, 2, fs);
67 frame_split(dir, size / fs);
68 free(mode);
69 @@ -2630,7 +2623,7 @@
70 }
71 char* com_command(char *cmd, regmatch_t *subs)
72 {
73 - int i; alias *a; autostr s; str_create(&s);
74 + int i; alias *a = NULL; autostr s; str_create(&s);
75 str_print(&s, strlen(command_hints)+NOTE, "%s \n", command_hints);
76 FOR_STACK (a, aliases, alias*, i) str_print(&s, NOTE, "%s \n", a->name);
77 menu_wrapper(s.pad, settings[ms_run_musca_command].s);
78 @@ -2747,7 +2740,7 @@
79 char* show_aliases()
80 {
81 autostr s; str_create(&s);
82 - alias *a; int i;
83 + alias *a = NULL; int i;
84 FOR_STACK (a, aliases, alias*, i)
85 str_print(&s, strlen(a->name)+strlen(a->command)+10, "alias %s %s\n",
86 a->name, a->command);
87 @@ -2849,7 +2842,7 @@
88 }
89 char* com_place(char *cmd, regmatch_t *subs)
90 {
91 - placement *p; int i;
92 + placement *p = NULL; int i;
93 char *class = regsubstr(cmd, subs, 1);
94 ubyte flag = parse_flag(cmd, subs, 2, 0);
95 char *group = regsubstr(cmd, subs, 3);
96 @@ -3441,7 +3434,7 @@
97 autostr s; str_create(&s);
98 for (;;)
99 {
100 - char c = getchar();
101 + int c = getchar();
102 if (c == EOF) break;
103 str_push(&s, c);
104 }
105 @@ -3530,7 +3523,7 @@
106 }
107 void grab_stuff()
108 {
109 - int i, j, k; head *h; binding *b; ucell *m;
110 + int i, j, k; head *h; binding *b; ucell *m = NULL;
111 refresh_bindings();
112 ungrab_stuff();
113 ucell modifiers[] = { 0, LockMask, NumlockMask, LockMask|NumlockMask };
114 @@ -3550,7 +3543,7 @@
115 {
116 int i;
117 command_hash = hash_create();
118 - command *c; autostr str; str_create(&str);
119 + command *c = NULL; autostr str; str_create(&str);
120 FOR_ARRAY (c, commands, command, i)
121 {
122 char *keys = c->keys;
123 @@ -3566,7 +3559,7 @@
124 strtrim(command_hints);
125 // compile setting regex
126 setting_hash = hash_create();
127 - setting *s;
128 + setting *s = NULL;
129 FOR_ARRAY (s, settings, setting, i)
130 hash_set(setting_hash, s->name, s);
131 // compile modmask regex
132 @@ -3597,7 +3590,7 @@
133 }
134 void setup_bindings()
135 {
136 - int i; keymap *k;
137 + int i; keymap *k = NULL;
138 // prepare key bindings
139 bindings = stack_create();
140 FOR_ARRAY (k, keymaps, keymap, i)
141 --- a/tools.c
142 +++ b/tools.c
143 @@ -227,7 +227,7 @@
144 ucell ptr = 0;
145 for (;;)
146 {
147 - byte c = fgetc(src);
148 + int c = fgetc(src);
149 if (c == EOF)
150 break;
151

  ViewVC Help
Powered by ViewVC 1.1.20