From 9767b4da5a88606ada9a3effc564d4c00091b645 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 11 Apr 2020 16:04:31 +0100 Subject: [PATCH] config: remove -S command line option Deprecated since v5 Signed-off-by: Yuxuan Shui --- src/options.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/options.c b/src/options.c index 546041e..44488c6 100644 --- a/src/options.c +++ b/src/options.c @@ -471,23 +471,21 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all } else if (o == 'd') { log_error("-d is removed, please use the DISPLAY " "environment variable"); - *exit_code = 1; - return true; + goto err; } else if (o == 314) { *all_xerrors = true; } else if (o == 318) { printf("%s\n", COMPTON_VERSION); return true; } else if (o == 'S') { - log_warn("-S will be ignored"); + log_error("-S is no longer available"); + goto err; } else if (o == 320) { log_error("--no-name-pixmap is no longer available"); - *exit_code = 1; - return true; + goto err; } else if (o == '?' || o == ':') { usage(argv[0], 1); - *exit_code = 1; - return true; + goto err; } } @@ -495,11 +493,13 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all if (optind < argc) { // log is not initialized here yet fprintf(stderr, "picom doesn't accept positional arguments.\n"); - *exit_code = 1; - return true; + goto err; } return false; +err: + *exit_code = 1; + return true; } /**