Commit a3e40917ee79b050b7cd99a9257eed4aea7603e1

Ran Benita 2012-03-01T23:43:51

Remove return's at the end of void functions Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
diff --git a/src/atom.c b/src/atom.c
index 82548c2..571c34c 100644
--- a/src/atom.c
+++ b/src/atom.c
@@ -103,7 +103,6 @@ xkb_init_atoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value)
             return;
         do_intern_atom = intern;
         do_get_atom_value = get_atom_value;
-        return;
     }
 }
 
diff --git a/src/maprules.c b/src/maprules.c
index d54265f..a1c92f6 100644
--- a/src/maprules.c
+++ b/src/maprules.c
@@ -79,7 +79,6 @@ InitInputLine(InputLine *line)
     line->num_line= 0;
     line->sz_line= DFLT_LINE_SIZE;
     line->line=	line->buf;
-    return;
 }
 
 static void
@@ -91,7 +90,6 @@ FreeInputLine(InputLine *line)
     line->num_line= 0;
     line->sz_line= DFLT_LINE_SIZE;
     line->line= line->buf;
-    return;
 }
 
 static int
@@ -363,7 +361,6 @@ SetUpRemap(InputLine *line,RemapSpec *remap)
 	return;
    }
    remap->number++;
-   return;
 }
 
 static Bool
@@ -979,7 +976,6 @@ XkbRF_ClearVarDescriptions(XkbRF_DescribeVarsPtr var)
     }
     free(var->desc);
     var->desc= NULL;
-    return;
 }
 
 void
@@ -1030,5 +1026,4 @@ XkbcRF_Free(XkbRF_RulesPtr rules,Bool freeRules)
 
     if (freeRules)
 	free(rules);
-    return;
 }
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index e065919..c5c4c9b 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -1250,7 +1250,6 @@ ApplyActionFactoryDefaults(union xkb_action * action)
     {
         action->iso.real_mods = LockMask;
     }
-    return;
 }
 
 static void
@@ -1436,5 +1435,4 @@ ActionsInit(void)
         constFalse.value.str = xkb_intern_atom("false");
         actionsInitialized = 1;
     }
-    return;
 }
diff --git a/src/xkbcomp/alias.c b/src/xkbcomp/alias.c
index b1bcc76..a75948e 100644
--- a/src/xkbcomp/alias.c
+++ b/src/xkbcomp/alias.c
@@ -71,7 +71,6 @@ HandleCollision(AliasInfo * old, AliasInfo * new)
     }
     old->def.fileID = new->def.fileID;
     old->def.merge = new->def.merge;
-    return;
 }
 
 static void
@@ -83,7 +82,6 @@ InitAliasInfo(AliasInfo * info,
     info->def.fileID = file_id;
     strncpy(info->alias, alias, XkbKeyNameLength);
     strncpy(info->real, real, XkbKeyNameLength);
-    return;
 }
 
 int
@@ -122,7 +120,6 @@ ClearAliases(AliasInfo ** info_in)
 {
     if ((info_in) && (*info_in))
         ClearCommonInfo(&(*info_in)->def);
-    return;
 }
 
 Bool
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 6b97460..7f41af6 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -129,7 +129,6 @@ InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
           XkbNumKbdGroups * sizeof(GroupCompatInfo));
     info->leds = NULL;
     InitVModInfo(&info->vmods, xkb);
-    return;
 }
 
 static void
@@ -156,7 +155,6 @@ ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
     info->leds = (LEDInfo *) ClearCommonInfo(&info->leds->defs);
     /* 3/30/94 (ef) -- XXX! Should free action info here */
     ClearVModInfo(&info->vmods, xkb);
-    return;
 }
 
 static SymInterpInfo *
@@ -387,7 +385,6 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
         else
             into->errorCount++;
     }
-    return;
 }
 
 typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
@@ -762,7 +759,6 @@ HandleCompatMapFile(XkbFile * file,
             break;
         }
     }
-    return;
 }
 
 static void
@@ -785,7 +781,6 @@ CopyInterps(CompatInfo * info,
         }
         compat->sym_interpret[compat->num_si++] = si->interp;
     }
-    return;
 }
 
 Bool
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index f152df3..51ccc63 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -276,7 +276,6 @@ InitPropertyInfo(PropertyInfo * pi, GeometryInfo * info)
     pi->defs.fileID = info->fileID;
     pi->defs.merge = info->merge;
     pi->name = pi->value = NULL;
-    return;
 }
 
 static void
@@ -298,7 +297,6 @@ FreeProperties(PropertyInfo * pi, GeometryInfo * info)
         next = (PropertyInfo *) tmp->defs.next;
         free(tmp);
     }
-    return;
 }
 
 static void
@@ -321,7 +319,6 @@ InitKeyInfo(KeyInfo * key, RowInfo * row, GeometryInfo * info)
         key->defs.next = NULL;
         key->row = row;
     }
-    return;
 }
 
 static void
@@ -332,7 +329,6 @@ ClearKeyInfo(KeyInfo * key)
     key->gap = 0;
     key->shape = None;
     key->color = None;
-    return;
 }
 
 static void
@@ -352,7 +348,6 @@ FreeKeys(KeyInfo * key, RowInfo * row, GeometryInfo * info)
         next = (KeyInfo *) tmp->defs.next;
         free(tmp);
     }
-    return;
 }
 
 static void
@@ -375,7 +370,6 @@ InitRowInfo(RowInfo * row, SectionInfo * section, GeometryInfo * info)
         row->keys = NULL;
         InitKeyInfo(&row->dfltKey, row, info);
     }
-    return;
 }
 
 static void
@@ -389,7 +383,6 @@ ClearRowInfo(RowInfo * row, GeometryInfo * info)
         FreeKeys(row->keys, row, info);
     ClearKeyInfo(&row->dfltKey);
     row->dfltKey.defs.defined |= _GK_Default;
-    return;
 }
 
 static void
@@ -409,7 +402,6 @@ FreeRows(RowInfo * row, SectionInfo * section, GeometryInfo * info)
         next = (RowInfo *) tmp->defs.next;
         free(tmp);
     }
-    return;
 }
 
 static DoodadInfo *
@@ -473,7 +465,6 @@ InitDoodadInfo(DoodadInfo * di, unsigned type, SectionInfo * si,
         if (info->nextPriority > XkbGeomMaxPriority)
             info->nextPriority = XkbGeomMaxPriority;
     }
-    return;
 }
 
 static void
@@ -485,7 +476,6 @@ ClearDoodadInfo(DoodadInfo * di)
     bzero(di, sizeof(DoodadInfo));
     di->defs = defs;
     di->defs.defined = 0;
-    return;
 }
 
 static void
@@ -496,7 +486,6 @@ ClearOverlayInfo(OverlayInfo * ol)
         ol->keys = (OverlayKeyInfo *) ClearCommonInfo(&ol->keys->defs);
         ol->nKeys = 0;
     }
-    return;
 }
 
 static void
@@ -528,7 +517,6 @@ FreeDoodads(DoodadInfo * di, SectionInfo * si, GeometryInfo * info)
         ClearDoodadInfo(tmp);
         free(tmp);
     }
-    return;
 }
 
 static void
@@ -553,7 +541,6 @@ InitSectionInfo(SectionInfo * si, GeometryInfo * info)
         si->name = xkb_intern_atom("default");
         InitRowInfo(&si->dfltRow, si, info);
     }
-    return;
 }
 
 static void
@@ -572,7 +559,6 @@ DupSectionInfo(SectionInfo * into, SectionInfo * from, GeometryInfo * info)
     into->dfltRow.dfltKey.defs.merge = defs.merge;
     into->dfltRow.dfltKey.defs.next = NULL;
     into->dfltRow.dfltKey.row = &into->dfltRow;
-    return;
 }
 
 static void
@@ -596,7 +582,6 @@ ClearSectionInfo(SectionInfo * si, GeometryInfo * info)
         si->doodads = NULL;
     }
     si->dfltRow.defs.defined = _GR_Default;
-    return;
 }
 
 static void
@@ -616,7 +601,6 @@ FreeSections(SectionInfo * si, GeometryInfo * info)
         next = (SectionInfo *) tmp->defs.next;
         free(tmp);
     }
-    return;
 }
 
 static void
@@ -653,7 +637,6 @@ FreeShapes(ShapeInfo * si, GeometryInfo * info)
         next = (ShapeInfo *) tmp->defs.next;
         free(tmp);
     }
-    return;
 }
 
 /***====================================================================***/
@@ -666,7 +649,6 @@ InitGeometryInfo(GeometryInfo * info, unsigned fileID, unsigned merge)
     info->merge = merge;
     InitSectionInfo(&info->dfltSection, info);
     info->dfltSection.defs.defined = _GS_Default;
-    return;
 }
 
 static void
@@ -687,7 +669,6 @@ ClearGeometryInfo(GeometryInfo * info)
     info->dfltSection.defs.defined = _GS_Default;
     if (info->aliases)
         ClearAliases(&info->aliases);
-    return;
 }
 
 /***====================================================================***/
@@ -868,7 +849,6 @@ ReplaceDoodad(DoodadInfo * into, DoodadInfo * from)
     next = from->defs.next;
     ClearDoodadInfo(from);
     from->defs.next = next;
-    return;
 }
 
 static DoodadInfo *
@@ -1306,7 +1286,6 @@ MergeIncludedGeometry(GeometryInfo * into, GeometryInfo * from,
     }
     if (!MergeAliases(&into->aliases, &from->aliases, merge))
         into->errorCount++;
-    return;
 }
 
 typedef void (*FileHandler) (XkbFile * /* file */ ,
@@ -2925,7 +2904,6 @@ HandleGeometryFile(XkbFile * file,
             break;
         }
     }
-    return;
 }
 
 /***====================================================================***/
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index e5ed348..98825ce 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -51,7 +51,6 @@ ClearIndicatorMapInfo(LEDInfo * info)
     info->vmods = 0;
     info->which_groups = info->groups = 0;
     info->ctrls = 0;
-    return;
 }
 
 LEDInfo *
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index d04edd7..47b9c35 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -50,7 +50,6 @@ LongToKeyName(unsigned long val, char *name)
     name[1] = ((val >> 16) & 0xff);
     name[2] = ((val >> 8) & 0xff);
     name[3] = (val & 0xff);
-    return;
 }
 
 /***====================================================================***/
@@ -143,7 +142,6 @@ InitIndicatorNameInfo(IndicatorNameInfo * ii, KeyNamesInfo * info)
     ii->ndx = 0;
     ii->name = None;
     ii->virtual = False;
-    return;
 }
 
 static void
@@ -154,7 +152,6 @@ ClearIndicatorNameInfo(IndicatorNameInfo * ii, KeyNamesInfo * info)
         ClearCommonInfo(&ii->defs);
         info->leds = NULL;
     }
-    return;
 }
 
 static IndicatorNameInfo *
@@ -335,7 +332,6 @@ ClearKeyNamesInfo(KeyNamesInfo * info)
         ClearIndicatorNameInfo(info->leds, info);
     if (info->aliases)
         ClearAliases(&info->aliases);
-    return;
 }
 
 static void
@@ -349,7 +345,6 @@ InitKeyNamesInfo(KeyNamesInfo * info)
     info->has_alt_forms = NULL;
     ClearKeyNamesInfo(info);
     info->errorCount = 0;
-    return;
 }
 
 static int
@@ -539,7 +534,6 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
             || (into->explicitMax < from->explicitMax))
             into->explicitMax = from->explicitMax;
     }
-    return;
 }
 
 /**
@@ -855,7 +849,6 @@ HandleKeycodesFile(XkbFile * file,
             break;
         }
     }
-    return;
 }
 
 /**
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index 883cd87..057c080 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -173,7 +173,6 @@ InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_desc * xkb, KeyTypesInfo * from
             }
         }
     }
-    return;
 }
 
 static void
@@ -188,7 +187,6 @@ FreeKeyTypeInfo(KeyTypeInfo * type)
         ClearCommonInfo(&type->preserve->defs);
         type->preserve = NULL;
     }
-    return;
 }
 
 static void
@@ -206,7 +204,6 @@ FreeKeyTypesInfo(KeyTypesInfo * info)
         info->types = (KeyTypeInfo *) ClearCommonInfo(&info->types->defs);
     }
     FreeKeyTypeInfo(&info->dflt);
-    return;
 }
 
 static KeyTypeInfo *
@@ -356,7 +353,6 @@ MergeIncludedKeyTypes(KeyTypesInfo * into,
             into->errorCount++;
     }
     into->stdPresent |= from->stdPresent;
-    return;
 }
 
 typedef void (*FileHandler) (XkbFile * /* file */ ,
@@ -473,7 +469,6 @@ DeleteLevel1MapEntries(KeyTypeInfo * type)
             type->nEntries--;
         }
     }
-    return;
 }
 
 /**
@@ -1083,7 +1078,6 @@ HandleKeyTypesFile(XkbFile * file,
             break;
         }
     }
-    return;
 }
 
 static Bool
diff --git a/src/xkbcomp/parseutils.c b/src/xkbcomp/parseutils.c
index a645744..5606cef 100644
--- a/src/xkbcomp/parseutils.c
+++ b/src/xkbcomp/parseutils.c
@@ -758,7 +758,6 @@ CheckDefaultMap(XkbFile * maps)
             }
         }
     }
-    return;
 }
 
 XkbFile *
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index b710e01..217b99f 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -109,7 +109,6 @@ InitKeyInfo(KeyInfo * info)
     info->nameForOverlayKey = 0;
     info->repeat = RepeatUndefined;
     info->allowNone = 0;
-    return;
 }
 
 /**
@@ -142,7 +141,6 @@ FreeKeyInfo(KeyInfo * info)
     info->nameForOverlayKey = 0;
     info->repeat = RepeatUndefined;
     info->allowNone = 0;
-    return;
 }
 
 /**
@@ -260,7 +258,6 @@ InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb)
     InitVModInfo(&info->vmods, xkb);
     info->action = NULL;
     info->aliases = NULL;
-    return;
 }
 
 static void
@@ -280,7 +277,6 @@ FreeSymbolsInfo(SymbolsInfo * info)
     if (info->aliases)
         ClearAliases(&info->aliases);
     bzero((char *) info, sizeof(SymbolsInfo));
-    return;
 }
 
 static Bool
@@ -745,7 +741,6 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
     }
     if (!MergeAliases(&into->aliases, &from->aliases, merge))
         into->errorCount++;
-    return;
 }
 
 typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
@@ -1642,7 +1637,6 @@ HandleSymbolsFile(XkbFile * file,
             break;
         }
     }
-    return;
 }
 
 static Bool
@@ -1865,7 +1859,6 @@ PrepareKeyDef(KeyInfo * key)
         key->actsDefined &= 1;
         key->typesDefined &= 1;
     }
-    return;
 }
 
 /**
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index 4811671..3a3c05d 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -41,7 +41,6 @@ InitVModInfo(VModInfo * info, struct xkb_desc * xkb)
 {
     ClearVModInfo(info, xkb);
     info->errorCount = 0;
-    return;
 }
 
 void
@@ -64,7 +63,6 @@ ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
                 info->defined |= bit;
         }
     }
-    return;
 }
 
 /***====================================================================***/
diff --git a/src/xkbcomp/xkbpath.c b/src/xkbcomp/xkbpath.c
index cc78e64..a446d57 100644
--- a/src/xkbcomp/xkbpath.c
+++ b/src/xkbcomp/xkbpath.c
@@ -199,7 +199,6 @@ XkbClearIncludePath(void)
         nPathEntries = 0;
     }
     noDefaultPath = True;
-    return;
 }
 
 /**