Fix 'gcc -Wextra -Wno-unused-parameter'.

This commit is contained in:
Peter Boström
2014-01-04 13:18:38 +01:00
committed by Michael Stapelberg
parent 2314f10778
commit f78c1ba053
10 changed files with 21 additions and 13 deletions

View File

@ -17,6 +17,9 @@ typedef enum {
POS_BOT
} position_t;
/* Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mode) */
typedef enum { M_DOCK = 0, M_HIDE = 1, M_INVISIBLE = 2 } bar_display_mode_t;
typedef struct config_t {
int modifier;
position_t position;
@ -31,8 +34,7 @@ typedef struct config_t {
int num_outputs;
char **outputs;
/* Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mode) */
enum { M_DOCK = 0, M_HIDE = 1, M_INVISIBLE = 2 } hide_on_modifier;
bar_display_mode_t hide_on_modifier;
/* The current hidden_state of the bar, which indicates whether it is hidden or shown */
enum { S_HIDE = 0, S_SHOW = 1 } hidden_state;

View File

@ -28,7 +28,7 @@
#include "common.h"
/* Global variables for child_*() */
i3bar_child child = {};
i3bar_child child;
/* stdin- and sigchild-watchers */
ev_io *stdin_io;

View File

@ -161,7 +161,7 @@ void got_bar_config_update(char *event) {
/* update the configuration with the received settings */
DLOG("Received bar config update \"%s\"\n", event);
int old_mode = config.hide_on_modifier;
bar_display_mode_t old_mode = config.hide_on_modifier;
parse_config_json(event);
if (old_mode != config.hide_on_modifier) {
reconfig_windows(true);

View File

@ -1524,7 +1524,9 @@ void reconfig_windows(bool redraw_bars) {
uint32_t top_end_x;
uint32_t bottom_start_x;
uint32_t bottom_end_x;
} __attribute__((__packed__)) strut_partial = {};
} __attribute__((__packed__)) strut_partial;
memset(&strut_partial, 0, sizeof(strut_partial));
switch (config.position) {
case POS_NONE:
break;