1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
--- src/remove.c 2007-07-23 12:56:20.000000000 +0200
+++ src/remove.c 2007-07-23 13:03:12.000000000 +0200
@@ -264,9 +264,10 @@ pop_dir (Dirstack_state *ds)
{
size_t n_lengths = obstack_object_size (&ds->len_stack) / sizeof (size_t);
size_t *length = obstack_base (&ds->len_stack);
+ size_t top_len;
assert (n_lengths > 0);
- size_t top_len = length[n_lengths - 1];
+ top_len = length[n_lengths - 1];
assert (top_len >= 2);
/* Pop the specified length of file name. */
@@ -424,10 +425,11 @@ AD_stack_top (Dirstack_state const *ds)
static void
AD_stack_pop (Dirstack_state *ds)
{
+ struct AD_ent *top;
assert (0 < AD_stack_height (ds));
/* operate on Active_dir. pop and free top entry */
- struct AD_ent *top = AD_stack_top (ds);
+ top = AD_stack_top (ds);
if (top->unremovable)
hash_free (top->unremovable);
obstack_blank (&ds->Active_dir, -(int) sizeof (struct AD_ent));
@@ -836,14 +838,13 @@ prompt (int fd_cwd, Dirstack_state const
{
int write_protected = 0;
int dirent_type = *pdirent_type;
+ int wp_errno = 0;
*is_empty = T_UNKNOWN;
if (x->interactive == RMI_NEVER)
return RM_OK;
- int wp_errno = 0;
-
if (!x->ignore_missing_files
&& ((x->interactive == RMI_ALWAYS) || x->stdin_tty)
&& dirent_type != DT_LNK)
@@ -891,6 +892,7 @@ prompt (int fd_cwd, Dirstack_state const
break;
}
+ {
char const *quoted_name = quote (full_filename (filename));
if (write_protected < 0)
@@ -930,6 +932,7 @@ prompt (int fd_cwd, Dirstack_state const
: _("%s: remove %s %s? ")),
program_name, file_type (sbuf), quoted_name);
}
+ }
if (!yesno ())
return RM_USER_DECLINED;
@@ -1549,6 +1552,7 @@ rm_1 (Dirstack_state *ds, char const *fi
return RM_ERROR;
}
+ {
struct stat st;
cache_stat_init (&st);
cycle_check_init (&ds->cycle_check_state);
@@ -1571,6 +1575,7 @@ rm_1 (Dirstack_state *ds, char const *fi
AD_push_initial (ds);
AD_INIT_OTHER_MEMBERS ();
+ {
enum RM_status status = remove_entry (AT_FDCWD, ds, filename,
DT_UNKNOWN, &st, x);
if (status == RM_NONEMPTY_DIR)
@@ -1589,6 +1594,8 @@ rm_1 (Dirstack_state *ds, char const *fi
ds_clear (ds);
return status;
}
+ }
+}
/* Remove all files and/or directories specified by N_FILES and FILE.
Apply the options in X. */
diff -upr src/rm.c src/rm.c
--- src/rm.c 2007-07-23 12:56:20.000000000 +0200
+++ src/rm.c 2007-07-23 13:03:12.000000000 +0200
@@ -357,6 +357,7 @@ main (int argc, char **argv)
quote ("/"));
}
+ {
size_t n_files = argc - optind;
char const *const *file = (char const *const *) argv + optind;
@@ -370,7 +371,10 @@ main (int argc, char **argv)
if (!yesno ())
exit (EXIT_SUCCESS);
}
+ {
enum RM_status status = rm (n_files, file, &x);
assert (VALID_STATUS (status));
exit (status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS);
+ }
+ }
}
diff -upr src/seq.c src/seq.c
--- src/seq.c 2008-04-14 11:17:15.000000000 +0200
+++ src/seq.c 2008-04-14 11:26:57.000000000 +0200
@@ -166,6 +166,7 @@ scan_arg (const char *arg)
: (decimal_point == arg /* .# -> 0.# */
|| ! ISDIGIT (decimal_point[-1]))); /* -.# -> 0.# */
}
+ {
char const *e = strchr (arg, 'e');
if (! e)
e = strchr (arg, 'E');
@@ -174,6 +175,7 @@ scan_arg (const char *arg)
long exponent = strtol (e + 1, NULL, 10);
ret.precision += exponent < 0 ? -exponent : 0;
}
+ }
}
return ret;
@@ -349,6 +351,7 @@ get_default_format (operand first, opera
size_t last_width = last.width + (prec - last.precision);
if (last.precision && prec == 0)
last_width--; /* don't include space for '.' */
+ {
size_t width = MAX (first_width, last_width);
if (width <= INT_MAX)
{
@@ -356,6 +359,7 @@ get_default_format (operand first, opera
sprintf (format_buf, "%%0%d.%dLf", w, prec);
return format_buf;
}
+ }
}
else
{
@@ -444,6 +448,7 @@ main (int argc, char **argv)
if (format_str)
{
validate_format (format_str);
+ {
char const *f = long_double_format (format_str, &layout);
if (! f)
{
@@ -451,6 +456,7 @@ main (int argc, char **argv)
usage (EXIT_FAILURE);
}
format_str = f;
+ }
}
last = scan_arg (argv[optind++]);
diff -upr src/shred.c src/shred.c
--- src/shred.c 2007-07-23 12:56:20.000000000 +0200
+++ src/shred.c 2007-07-23 13:03:12.000000000 +0200
@@ -461,7 +461,7 @@ dopass (int fd, char const *qname, off_t
out. Thus, it shouldn't give up on bad blocks. This
code works because lim is always a multiple of
SECTOR_SIZE, except at the end. */
- verify (sizeof r % SECTOR_SIZE == 0);
+ { verify (sizeof r % SECTOR_SIZE == 0); }
if (errnum == EIO && 0 <= size && (soff | SECTOR_MASK) < lim)
{
size_t soff1 = (soff | SECTOR_MASK) + 1;
|