Fix 'gcc -Wextra -Wno-unused-parameter'.
This commit is contained in:
parent
2314f10778
commit
f78c1ba053
|
@ -453,7 +453,7 @@ static char *resolve_tilde(const char *path) {
|
|||
char *head, *tail, *result;
|
||||
|
||||
tail = strchr(path, '/');
|
||||
head = strndup(path, tail ? tail - path : strlen(path));
|
||||
head = strndup(path, tail ? (size_t)(tail - path) : strlen(path));
|
||||
|
||||
int res = glob(head, GLOB_TILDE, NULL, &globbuf);
|
||||
free(head);
|
||||
|
|
|
@ -467,7 +467,8 @@ int main(int argc, char *argv[]) {
|
|||
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));
|
||||
|
||||
strut_partial.top = font.height + 6;
|
||||
strut_partial.top_start_x = 0;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -80,7 +80,7 @@ Con *con_parent_with_orientation(Con *con, orientation_t orientation);
|
|||
* Returns the first fullscreen node below this node.
|
||||
*
|
||||
*/
|
||||
Con *con_get_fullscreen_con(Con *con, int fullscreen_mode);
|
||||
Con *con_get_fullscreen_con(Con *con, fullscreen_mode_t fullscreen_mode);
|
||||
|
||||
/**
|
||||
* Returns true if the container is internal, such as __i3_scratch
|
||||
|
@ -192,7 +192,7 @@ void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates, bool
|
|||
* container).
|
||||
*
|
||||
*/
|
||||
int con_orientation(Con *con);
|
||||
orientation_t con_orientation(Con *con);
|
||||
|
||||
/**
|
||||
* Returns the container which will be focused next when the given container
|
||||
|
|
|
@ -449,6 +449,9 @@ struct Assignment {
|
|||
TAILQ_ENTRY(Assignment) assignments;
|
||||
};
|
||||
|
||||
/** Fullscreen modes. Used by Con.fullscreen_mode. */
|
||||
typedef enum { CF_NONE = 0, CF_OUTPUT = 1, CF_GLOBAL = 2 } fullscreen_mode_t;
|
||||
|
||||
/**
|
||||
* A 'Con' represents everything from the X11 root window down to a single X11 window.
|
||||
*
|
||||
|
@ -537,7 +540,7 @@ struct Con {
|
|||
|
||||
TAILQ_HEAD(swallow_head, Match) swallow_head;
|
||||
|
||||
enum { CF_NONE = 0, CF_OUTPUT = 1, CF_GLOBAL = 2 } fullscreen_mode;
|
||||
fullscreen_mode_t fullscreen_mode;
|
||||
/* layout is the layout of this container: one of split[v|h], stacked or
|
||||
* tabbed. Special containers in the tree (above workspaces) have special
|
||||
* layouts like dockarea or output.
|
||||
|
|
|
@ -353,7 +353,7 @@ struct bfs_entry {
|
|||
* Returns the first fullscreen node below this node.
|
||||
*
|
||||
*/
|
||||
Con *con_get_fullscreen_con(Con *con, int fullscreen_mode) {
|
||||
Con *con_get_fullscreen_con(Con *con, fullscreen_mode_t fullscreen_mode) {
|
||||
Con *current, *child;
|
||||
|
||||
/* TODO: is breadth-first-search really appropriate? (check as soon as
|
||||
|
@ -826,7 +826,7 @@ void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates, bool
|
|||
* container).
|
||||
*
|
||||
*/
|
||||
int con_orientation(Con *con) {
|
||||
orientation_t con_orientation(Con *con) {
|
||||
switch (con->layout) {
|
||||
case L_SPLITV:
|
||||
/* stacking containers behave like they are in vertical orientation */
|
||||
|
|
|
@ -130,7 +130,7 @@ char *resolve_tilde(const char *path) {
|
|||
char *head, *tail, *result;
|
||||
|
||||
tail = strchr(path, '/');
|
||||
head = strndup(path, tail ? tail - path : strlen(path));
|
||||
head = strndup(path, tail ? (size_t)(tail - path) : strlen(path));
|
||||
|
||||
int res = glob(head, GLOB_TILDE, NULL, &globbuf);
|
||||
free(head);
|
||||
|
|
Loading…
Reference in New Issue