diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2002-03-30 17:10:20 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2002-03-30 17:10:20 +0000 |
commit | 99e772806a36ae098c6182c10930a22d0e294773 (patch) | |
tree | 1711f44fbf118a1272386226ffd60f4cc94cc20c /usr.bin/indent/args.c | |
parent | 02ab2c827dc5bab7d906f77bfdbb34f353f214aa (diff) | |
download | FreeBSD-src-99e772806a36ae098c6182c10930a22d0e294773.zip FreeBSD-src-99e772806a36ae098c6182c10930a22d0e294773.tar.gz |
1) Const enough things to avoid warnings.
2) Cast ifdef_level to a size_t before comparing it to a ratio of size_ts.
Ifdef_level should always be positive.
3) Complete prototype for chfont.
4) Cast some ptrdiff_ts to ints before using as a field width.
5) Avoid shadowing a local variable p with another local variable p.
Diffstat (limited to 'usr.bin/indent/args.c')
-rw-r--r-- | usr.bin/indent/args.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/indent/args.c b/usr.bin/indent/args.c index 3693e1e..a4f7bfb 100644 --- a/usr.bin/indent/args.c +++ b/usr.bin/indent/args.c @@ -72,7 +72,7 @@ static const char rcsid[] = static void scan_profile(FILE *); -char *option_source = "?"; +const char *option_source = "?"; /* * N.B.: because of the way the table here is scanned, options whose names are @@ -81,7 +81,7 @@ char *option_source = "?"; * default value is the one actually assigned. */ struct pro { - char *p_name; /* name, eg -bl, -cli */ + const char *p_name; /* name, eg -bl, -cli */ int p_type; /* type (int, bool, special) */ int p_default; /* the default value (if int) */ int p_special; /* depends on type */ @@ -200,10 +200,10 @@ scan_profile(register FILE *f) } } -char *param_start; +const char *param_start; static int -eqin(char *s1, char *s2) +eqin(const char *s1, const char *s2) { while (*s1) { if (*s1++ != *s2++) |