From 58e7e42033b1ac5044ae03f0aa5d5082c5fdb497 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 3 Aug 2009 08:32:44 -0400 Subject: [PATCH] build: reenable "syntax-check" rule: sc_const_long_option * cfg.mk (disable_temporarily): Remove sc_const_long_option. * daemon/guestfsd.c (main): Declare long_options to be "const". * fish/fish.c (main): Likewise. * test-tool/test-tool.c (main): Likewise. --- cfg.mk | 1 - daemon/guestfsd.c | 2 +- fish/fish.c | 2 +- test-tool/test-tool.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cfg.mk b/cfg.mk index 5d2f225..e92c34f 100644 --- a/cfg.mk +++ b/cfg.mk @@ -71,7 +71,6 @@ disable_temporarily = \ sc_m4_quote_check \ sc_prohibit_trailing_blank_lines \ sc_avoid_ctype_macros \ - sc_const_long_option \ sc_avoid_write \ sc_trailing_blank diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 7bd384e..e8fb48f 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -68,7 +68,7 @@ int main (int argc, char *argv[]) { static const char *options = "fh:p:?"; - static struct option long_options[] = { + static const struct option long_options[] = { { "foreground", 0, 0, 'f' }, { "help", 0, 0, '?' }, { "host", 1, 0, 'h' }, diff --git a/fish/fish.c b/fish/fish.c index bb0762f..b0d123d 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -127,7 +127,7 @@ int main (int argc, char *argv[]) { static const char *options = "a:Df:h::im:nrv?Vx"; - static struct option long_options[] = { + static const struct option long_options[] = { { "add", 1, 0, 'a' }, { "cmd-help", 2, 0, 'h' }, { "file", 1, 0, 'f' }, diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c index 9617073..f37656a 100644 --- a/test-tool/test-tool.c +++ b/test-tool/test-tool.c @@ -76,7 +76,7 @@ int main (int argc, char *argv[]) { static const char *options = "?"; - static struct option long_options[] = { + static const struct option long_options[] = { { "help", 0, 0, '?' }, { "helper", 1, 0, 0 }, { "qemu", 1, 0, 0 }, -- 1.8.3.1