Merge pull request #3918 from orestisfl/fno-common
Fix fno-common problems with gcc10
This commit is contained in:
commit
f517b5aa57
|
@ -31,7 +31,7 @@ install:
|
||||||
script:
|
script:
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-safe-wrappers.sh
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-safe-wrappers.sh
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-formatting.sh
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-formatting.sh
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror"'
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common"'
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-spelling.pl
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-spelling.pl
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} ./travis/run-tests.sh
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} ./travis/run-tests.sh
|
||||||
- ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/debian-build.sh deb/debian-amd64/DIST
|
- ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/debian-build.sh deb/debian-amd64/DIST
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#include "xcb.h"
|
#include "xcb.h"
|
||||||
|
xcb_visualtype_t *visual_type = NULL;
|
||||||
#include "libi3.h"
|
#include "libi3.h"
|
||||||
|
|
||||||
#define TEXT_PADDING logical_px(4)
|
#define TEXT_PADDING logical_px(4)
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
* to i3.
|
* to i3.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "libi3.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -27,6 +25,9 @@
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include <xcb/xcb_keysyms.h>
|
#include <xcb/xcb_keysyms.h>
|
||||||
|
|
||||||
|
xcb_visualtype_t *visual_type = NULL;
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
#include "keysym2ucs.h"
|
#include "keysym2ucs.h"
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
* when the user has an error in their configuration file.
|
* when the user has an error in their configuration file.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "libi3.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -32,6 +30,9 @@
|
||||||
#include <xcb/randr.h>
|
#include <xcb/randr.h>
|
||||||
#include <xcb/xcb_cursor.h>
|
#include <xcb/xcb_cursor.h>
|
||||||
|
|
||||||
|
xcb_visualtype_t *visual_type = NULL;
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#define SN_API_NOT_YET_FROZEN 1
|
#define SN_API_NOT_YET_FROZEN 1
|
||||||
#include <libsn/sn-launchee.h>
|
#include <libsn/sn-launchee.h>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
typedef struct rect_t rect;
|
typedef struct rect_t rect;
|
||||||
|
|
||||||
struct ev_loop *main_loop;
|
extern struct ev_loop *main_loop;
|
||||||
|
|
||||||
struct rect_t {
|
struct rect_t {
|
||||||
int x;
|
int x;
|
||||||
|
@ -82,8 +82,8 @@ struct status_block {
|
||||||
blocks;
|
blocks;
|
||||||
};
|
};
|
||||||
|
|
||||||
TAILQ_HEAD(statusline_head, status_block)
|
extern TAILQ_HEAD(statusline_head, status_block)
|
||||||
statusline_head;
|
statusline_head;
|
||||||
|
|
||||||
#include "child.h"
|
#include "child.h"
|
||||||
#include "ipc.h"
|
#include "ipc.h"
|
||||||
|
|
|
@ -74,7 +74,7 @@ typedef struct config_t {
|
||||||
S_SHOW = 1 } hidden_state;
|
S_SHOW = 1 } hidden_state;
|
||||||
} config_t;
|
} config_t;
|
||||||
|
|
||||||
config_t config;
|
extern config_t config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start parsing the received bar configuration JSON string
|
* Start parsing the received bar configuration JSON string
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
typedef struct i3_output i3_output;
|
typedef struct i3_output i3_output;
|
||||||
|
|
||||||
SLIST_HEAD(outputs_head, i3_output);
|
SLIST_HEAD(outputs_head, i3_output);
|
||||||
struct outputs_head* outputs;
|
extern struct outputs_head* outputs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start parsing the received JSON string
|
* Start parsing the received JSON string
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct xcb_color_strings_t {
|
||||||
typedef struct xcb_colors_t xcb_colors_t;
|
typedef struct xcb_colors_t xcb_colors_t;
|
||||||
|
|
||||||
/* Cached width of the custom separator if one was set */
|
/* Cached width of the custom separator if one was set */
|
||||||
int separator_symbol_width;
|
extern int separator_symbol_width;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Early initialization of the connection to X11: Everything which does not
|
* Early initialization of the connection to X11: Everything which does not
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
|
config_t config;
|
||||||
static char *cur_key;
|
static char *cur_key;
|
||||||
static bool parsing_bindings;
|
static bool parsing_bindings;
|
||||||
static bool parsing_tray_outputs;
|
static bool parsing_tray_outputs;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <glob.h>
|
#include <glob.h>
|
||||||
|
|
||||||
|
struct ev_loop *main_loop;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
|
* Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
|
||||||
*
|
*
|
||||||
|
|
|
@ -252,6 +252,7 @@ static yajl_callbacks outputs_callbacks = {
|
||||||
.yajl_end_map = outputs_end_map_cb,
|
.yajl_end_map = outputs_end_map_cb,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct outputs_head *outputs;
|
||||||
/*
|
/*
|
||||||
* Initiate the outputs list
|
* Initiate the outputs list
|
||||||
*
|
*
|
||||||
|
|
|
@ -140,6 +140,9 @@ static const int tray_loff_px = 2;
|
||||||
/* Vertical offset between the bar and a separator */
|
/* Vertical offset between the bar and a separator */
|
||||||
static const int sep_voff_px = 4;
|
static const int sep_voff_px = 4;
|
||||||
|
|
||||||
|
/* Cached width of the custom separator if one was set */
|
||||||
|
int separator_symbol_width;
|
||||||
|
|
||||||
int _xcb_request_failed(xcb_void_cookie_t cookie, char *err_msg, int line) {
|
int _xcb_request_failed(xcb_void_cookie_t cookie, char *err_msg, int line) {
|
||||||
xcb_generic_error_t *err;
|
xcb_generic_error_t *err;
|
||||||
if ((err = xcb_request_check(xcb_connection, cookie)) != NULL) {
|
if ((err = xcb_request_check(xcb_connection, cookie)) != NULL) {
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
XCB_EVENT_MASK_FOCUS_CHANGE | \
|
XCB_EVENT_MASK_FOCUS_CHANGE | \
|
||||||
XCB_EVENT_MASK_ENTER_WINDOW)
|
XCB_EVENT_MASK_ENTER_WINDOW)
|
||||||
|
|
||||||
#define xmacro(atom) xcb_atom_t A_##atom;
|
#define xmacro(atom) extern xcb_atom_t A_##atom;
|
||||||
#include "atoms.xmacro"
|
#include "atoms.xmacro"
|
||||||
#undef xmacro
|
#undef xmacro
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <cairo/cairo-xcb.h>
|
#include <cairo/cairo-xcb.h>
|
||||||
|
|
||||||
/* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */
|
/* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */
|
||||||
xcb_visualtype_t *visual_type;
|
extern xcb_visualtype_t *visual_type;
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
static void draw_util_set_source_color(surface_t *surface, color_t color);
|
static void draw_util_set_source_color(surface_t *surface, color_t color);
|
||||||
|
|
|
@ -93,6 +93,11 @@ bool shape_supported = true;
|
||||||
|
|
||||||
bool force_xinerama = false;
|
bool force_xinerama = false;
|
||||||
|
|
||||||
|
/* Define all atoms as global variables */
|
||||||
|
#define xmacro(atom) xcb_atom_t A_##atom;
|
||||||
|
#include "atoms.xmacro"
|
||||||
|
#undef xmacro
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This callback is only a dummy, see xcb_prepare_cb.
|
* This callback is only a dummy, see xcb_prepare_cb.
|
||||||
* See also man libev(3): "ev_prepare" and "ev_check" - customise your event loop
|
* See also man libev(3): "ev_prepare" and "ev_check" - customise your event loop
|
||||||
|
|
2
src/x.c
2
src/x.c
|
@ -14,8 +14,6 @@
|
||||||
#define MAX(x, y) ((x) > (y) ? (x) : (y))
|
#define MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
xcb_window_t ewmh_window;
|
|
||||||
|
|
||||||
/* Stores the X11 window ID of the currently focused window */
|
/* Stores the X11 window ID of the currently focused window */
|
||||||
xcb_window_t focused_id = XCB_NONE;
|
xcb_window_t focused_id = XCB_NONE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue