Make gcc happy
This commit is contained in:
parent
c37c6c41ed
commit
0d6b1627f2
8
src/c2.c
8
src/c2.c
|
@ -48,7 +48,7 @@ typedef struct {
|
|||
.l = NULL, \
|
||||
}
|
||||
|
||||
const static c2_ptr_t C2_PTR_NULL = C2_PTR_INIT;
|
||||
static const c2_ptr_t C2_PTR_NULL = C2_PTR_INIT;
|
||||
|
||||
/// Operator of a branch element.
|
||||
typedef enum {
|
||||
|
@ -164,7 +164,7 @@ struct _c2_l {
|
|||
.ptnint = 0, \
|
||||
}
|
||||
|
||||
const static c2_l_t leaf_def = C2_L_INIT;
|
||||
static const c2_l_t leaf_def = C2_L_INIT;
|
||||
|
||||
/// Linked list type of conditions.
|
||||
struct _c2_lptr {
|
||||
|
@ -188,7 +188,7 @@ typedef struct {
|
|||
} c2_predef_t;
|
||||
|
||||
// Predefined targets.
|
||||
const static c2_predef_t C2_PREDEFS[] = {
|
||||
static const c2_predef_t C2_PREDEFS[] = {
|
||||
[C2_L_PID ] = { "id" , C2_L_TCARDINAL , 0 },
|
||||
[C2_L_PX ] = { "x" , C2_L_TCARDINAL , 0 },
|
||||
[C2_L_PY ] = { "y" , C2_L_TCARDINAL , 0 },
|
||||
|
@ -378,7 +378,7 @@ c2_parsed(session_t *ps, c2_lptr_t **pcondlst, const char *pattern,
|
|||
|
||||
// Insert to pcondlst
|
||||
{
|
||||
const static c2_lptr_t lptr_def = C2_LPTR_INIT;
|
||||
static const c2_lptr_t lptr_def = C2_LPTR_INIT;
|
||||
c2_lptr_t *plptr = malloc(sizeof(c2_lptr_t));
|
||||
if (!plptr)
|
||||
printf_errfq(1, "(): Failed to allocate memory for new condition linked"
|
||||
|
|
|
@ -82,7 +82,7 @@ static void (* const (VSYNC_FUNCS_DEINIT[NUM_VSYNC]))(session_t *ps) = {
|
|||
|
||||
/// Names of root window properties that could point to a pixmap of
|
||||
/// background.
|
||||
const static char *background_props_str[] = {
|
||||
static const char *background_props_str[] = {
|
||||
"_XROOTPMAP_ID",
|
||||
"_XSETROOT_ID",
|
||||
0,
|
||||
|
@ -2807,7 +2807,7 @@ win_recheck_client(session_t *ps, win *w) {
|
|||
|
||||
static bool
|
||||
add_win(session_t *ps, Window id, Window prev) {
|
||||
const static win win_def = {
|
||||
static const win win_def = {
|
||||
.next = NULL,
|
||||
.prev_trans = NULL,
|
||||
|
||||
|
@ -4443,7 +4443,7 @@ static void
|
|||
usage(int ret) {
|
||||
#define WARNING_DISABLED " (DISABLED AT COMPILE TIME)"
|
||||
#define WARNING
|
||||
const static char *usage_text =
|
||||
static const char *usage_text =
|
||||
"compton (" COMPTON_VERSION ")\n"
|
||||
"This is the maintenance fork of compton, please report\n"
|
||||
"bugs to https://github.com/yshui/compton\n\n"
|
||||
|
@ -4983,8 +4983,8 @@ write_pid(session_t *ps) {
|
|||
*/
|
||||
static void
|
||||
get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
|
||||
const static char *shortopts = "D:I:O:d:r:o:m:l:t:i:e:hscnfFCaSzGb";
|
||||
const static struct option longopts[] = {
|
||||
static const char *shortopts = "D:I:O:d:r:o:m:l:t:i:e:hscnfFCaSzGb";
|
||||
static const struct option longopts[] = {
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ "config", required_argument, NULL, 256 },
|
||||
{ "shadow-radius", required_argument, NULL, 'r' },
|
||||
|
@ -5400,7 +5400,7 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
|
|||
// Convolution filter parameter (box blur)
|
||||
// gaussian or binomial filters are definitely superior, yet looks
|
||||
// like they aren't supported as of xorg-server-1.13.0
|
||||
const static XFixed convolution_blur[] = {
|
||||
static const XFixed convolution_blur[] = {
|
||||
// Must convert to XFixed with XDoubleToFixed()
|
||||
// Matrix size
|
||||
XDoubleToFixed(3), XDoubleToFixed(3),
|
||||
|
@ -5978,7 +5978,7 @@ timeout_get_poll_time(session_t *ps) {
|
|||
timeout_t *
|
||||
timeout_insert(session_t *ps, time_ms_t interval,
|
||||
bool (*callback)(session_t *ps, timeout_t *ptmout), void *data) {
|
||||
const static timeout_t tmout_def = {
|
||||
static const timeout_t tmout_def = {
|
||||
.enabled = true,
|
||||
.data = NULL,
|
||||
.callback = NULL,
|
||||
|
@ -6251,7 +6251,7 @@ cxinerama_upd_scrs(session_t *ps) {
|
|||
*/
|
||||
static session_t *
|
||||
session_init(session_t *ps_old, int argc, char **argv) {
|
||||
const static session_t s_def = {
|
||||
static const session_t s_def = {
|
||||
.dpy = NULL,
|
||||
.scr = 0,
|
||||
.vis = NULL,
|
||||
|
|
|
@ -41,10 +41,10 @@ lcfg_lookup_int(const config_t *config, const char *path, int *value) {
|
|||
*/
|
||||
FILE *
|
||||
open_config_file(char *cpath, char **ppath) {
|
||||
const static char *config_filename = "/compton.conf";
|
||||
const static char *config_filename_legacy = "/.compton.conf";
|
||||
const static char *config_home_suffix = "/.config";
|
||||
const static char *config_system_dir = "/etc/xdg";
|
||||
static const char *config_filename = "/compton.conf";
|
||||
static const char *config_filename_legacy = "/.compton.conf";
|
||||
static const char *config_home_suffix = "/.config";
|
||||
static const char *config_system_dir = "/etc/xdg";
|
||||
|
||||
char *dir = NULL, *home = NULL;
|
||||
char *path = cpath;
|
||||
|
|
|
@ -1127,7 +1127,7 @@ cdbus_process_opts_set_success:
|
|||
*/
|
||||
static bool
|
||||
cdbus_process_introspect(session_t *ps, DBusMessage *msg) {
|
||||
const static char *str_introspect =
|
||||
static const char *str_introspect =
|
||||
"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n"
|
||||
" \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
|
||||
"<node name='" CDBUS_OBJECT_NAME "'>\n"
|
||||
|
|
Loading…
Reference in New Issue