mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
Make command line option lists const
This commit is contained in:
parent
8f2cd3236f
commit
169b90f90b
|
@ -245,7 +245,7 @@ static void handle_wlr_log(enum wlr_log_importance importance,
|
|||
int main(int argc, char **argv) {
|
||||
static int verbose = 0, debug = 0, validate = 0, allow_unsupported_gpu = 0;
|
||||
|
||||
static struct option long_options[] = {
|
||||
static const struct option long_options[] = {
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"config", required_argument, NULL, 'c'},
|
||||
{"validate", no_argument, NULL, 'C'},
|
||||
|
|
|
@ -18,7 +18,7 @@ int main(int argc, char **argv) {
|
|||
char *socket_path = NULL;
|
||||
bool debug = false;
|
||||
|
||||
static struct option long_options[] = {
|
||||
static const struct option long_options[] = {
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
{"socket", required_argument, NULL, 's'},
|
||||
|
|
|
@ -343,7 +343,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
sway_log_init(SWAY_INFO, NULL);
|
||||
|
||||
static struct option long_options[] = {
|
||||
static const struct option long_options[] = {
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"monitor", no_argument, NULL, 'm'},
|
||||
{"pretty", no_argument, NULL, 'p'},
|
||||
|
|
|
@ -51,7 +51,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
|
|||
TO_PADDING_BTN,
|
||||
};
|
||||
|
||||
static struct option opts[] = {
|
||||
static const struct option opts[] = {
|
||||
{"button", required_argument, NULL, 'b'},
|
||||
{"button-no-terminal", required_argument, NULL, 'B'},
|
||||
{"button-dismiss", required_argument, NULL, 'z'},
|
||||
|
|
Loading…
Reference in a new issue