diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2021-02-03 21:50:25 -0500 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-02-04 09:49:06 +0100 |
commit | 169b90f90b518b2ca2d4bc445d6bfb05b57a20df (patch) | |
tree | ecea1f1fbb78c90da53bf9e3c2a01427d4a8a4fd | |
parent | Make Wayland request listeners static const when possible (diff) | |
download | sway-169b90f90b518b2ca2d4bc445d6bfb05b57a20df.tar.gz sway-169b90f90b518b2ca2d4bc445d6bfb05b57a20df.tar.zst sway-169b90f90b518b2ca2d4bc445d6bfb05b57a20df.zip |
Make command line option lists const
-rw-r--r-- | sway/main.c | 2 | ||||
-rw-r--r-- | swaybar/main.c | 2 | ||||
-rw-r--r-- | swaymsg/main.c | 2 | ||||
-rw-r--r-- | swaynag/config.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sway/main.c b/sway/main.c index 0c219fb3..84f8eb6e 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -245,7 +245,7 @@ static void handle_wlr_log(enum wlr_log_importance importance, | |||
245 | int main(int argc, char **argv) { | 245 | int main(int argc, char **argv) { |
246 | static int verbose = 0, debug = 0, validate = 0, allow_unsupported_gpu = 0; | 246 | static int verbose = 0, debug = 0, validate = 0, allow_unsupported_gpu = 0; |
247 | 247 | ||
248 | static struct option long_options[] = { | 248 | static const struct option long_options[] = { |
249 | {"help", no_argument, NULL, 'h'}, | 249 | {"help", no_argument, NULL, 'h'}, |
250 | {"config", required_argument, NULL, 'c'}, | 250 | {"config", required_argument, NULL, 'c'}, |
251 | {"validate", no_argument, NULL, 'C'}, | 251 | {"validate", no_argument, NULL, 'C'}, |
diff --git a/swaybar/main.c b/swaybar/main.c index 5c36d66b..a44c1e63 100644 --- a/swaybar/main.c +++ b/swaybar/main.c | |||
@@ -18,7 +18,7 @@ int main(int argc, char **argv) { | |||
18 | char *socket_path = NULL; | 18 | char *socket_path = NULL; |
19 | bool debug = false; | 19 | bool debug = false; |
20 | 20 | ||
21 | static struct option long_options[] = { | 21 | static const struct option long_options[] = { |
22 | {"help", no_argument, NULL, 'h'}, | 22 | {"help", no_argument, NULL, 'h'}, |
23 | {"version", no_argument, NULL, 'v'}, | 23 | {"version", no_argument, NULL, 'v'}, |
24 | {"socket", required_argument, NULL, 's'}, | 24 | {"socket", required_argument, NULL, 's'}, |
diff --git a/swaymsg/main.c b/swaymsg/main.c index 60536e48..574d3b75 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -343,7 +343,7 @@ int main(int argc, char **argv) { | |||
343 | 343 | ||
344 | sway_log_init(SWAY_INFO, NULL); | 344 | sway_log_init(SWAY_INFO, NULL); |
345 | 345 | ||
346 | static struct option long_options[] = { | 346 | static const struct option long_options[] = { |
347 | {"help", no_argument, NULL, 'h'}, | 347 | {"help", no_argument, NULL, 'h'}, |
348 | {"monitor", no_argument, NULL, 'm'}, | 348 | {"monitor", no_argument, NULL, 'm'}, |
349 | {"pretty", no_argument, NULL, 'p'}, | 349 | {"pretty", no_argument, NULL, 'p'}, |
diff --git a/swaynag/config.c b/swaynag/config.c index ca7f4eb2..c6b4e431 100644 --- a/swaynag/config.c +++ b/swaynag/config.c | |||
@@ -51,7 +51,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag, | |||
51 | TO_PADDING_BTN, | 51 | TO_PADDING_BTN, |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static struct option opts[] = { | 54 | static const struct option opts[] = { |
55 | {"button", required_argument, NULL, 'b'}, | 55 | {"button", required_argument, NULL, 'b'}, |
56 | {"button-no-terminal", required_argument, NULL, 'B'}, | 56 | {"button-no-terminal", required_argument, NULL, 'B'}, |
57 | {"button-dismiss", required_argument, NULL, 'z'}, | 57 | {"button-dismiss", required_argument, NULL, 'z'}, |