diff options
author | Sami Kerola | 2013-04-08 21:32:49 +0200 |
---|---|---|
committer | Karel Zak | 2013-04-09 12:17:20 +0200 |
commit | 3acc206d39de38f7d78008950cd030fceb125ff0 (patch) | |
tree | c66b0823e6c132d4b80f9f90133fa4e63f3f146c /text-utils/rev.c | |
parent | bash-completion: swapon: add options and fix argument (diff) | |
download | kernel-qcow2-util-linux-3acc206d39de38f7d78008950cd030fceb125ff0.tar.gz kernel-qcow2-util-linux-3acc206d39de38f7d78008950cd030fceb125ff0.tar.xz kernel-qcow2-util-linux-3acc206d39de38f7d78008950cd030fceb125ff0.zip |
various: fix variable and function declarations [smatch scan]
disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code
fdisks/sfdisk.c:982:5: warning: mixing declarations and code
fdisks/sfdisk.c:1254:5: warning: mixing declarations and code
fdisks/sfdisk.c:1564:5: warning: mixing declarations and code
lib/mbsalign.c:279:7: warning: mixing declarations and code
libblkid/src/devname.c:378:17: warning: mixing declarations and code
libfdisk/src/alignment.c:219:9: warning: mixing declarations and code
term-utils/wall.c:111:9: warning: mixing declarations and code
text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks'
text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line'
text-utils/rev.c:105:9: warning: mixing declarations and code
text-utils/tailf.c:245:9: warning: mixing declarations and code
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'text-utils/rev.c')
-rw-r--r-- | text-utils/rev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/text-utils/rev.c b/text-utils/rev.c index 00d519695..95545064a 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -94,6 +94,12 @@ int main(int argc, char *argv[]) FILE *fp = stdin; int ch, rval = EXIT_SUCCESS; + static const struct option longopts[] = { + { "version", no_argument, 0, 'V' }, + { "help", no_argument, 0, 'h' }, + { NULL, 0, 0, 0 } + }; + setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); @@ -102,12 +108,6 @@ int main(int argc, char *argv[]) signal(SIGINT, sig_handler); signal(SIGTERM, sig_handler); - static const struct option longopts[] = { - { "version", no_argument, 0, 'V' }, - { "help", no_argument, 0, 'h' }, - { NULL, 0, 0, 0 } - }; - while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1) switch(ch) { case 'V': |