coreutils/coreutils-9.4-if-lint.patch
2024-02-16 09:04:49 +09:00

131 lines
4.1 KiB
Diff

diff -ruN a/src/chcon.c b/src/chcon.c
--- a/src/chcon.c 2023-07-05 20:09:55.000000000 +0900
+++ b/src/chcon.c 2024-02-16 08:41:13.733647335 +0900
@@ -140,7 +140,7 @@
change_file_context (int fd, char const *file)
{
char *file_context = nullptr;
- context_t context IF_LINT (= 0);
+ context_t context = 0;
char const * context_string;
int errors = 0;
diff -ruN a/src/copy.c b/src/copy.c
--- a/src/copy.c 2023-08-29 20:39:27.000000000 +0900
+++ b/src/copy.c 2024-02-16 08:36:01.558446985 +0900
@@ -2207,8 +2207,8 @@
{
struct stat src_sb;
struct stat dst_sb;
- mode_t src_mode IF_LINT ( = 0);
- mode_t dst_mode IF_LINT ( = 0);
+ mode_t src_mode = 0;
+ mode_t dst_mode = 0;
mode_t dst_mode_bits;
mode_t omitted_permissions;
bool restore_dst_mode = false;
diff -ruN a/src/ls.c b/src/ls.c
--- a/src/ls.c 2023-08-29 20:39:27.000000000 +0900
+++ b/src/ls.c 2024-02-16 08:36:01.559447030 +0900
@@ -4520,7 +4520,7 @@
int needs_general_quoting, size_t *width, bool *pad)
{
char *buf = *inbuf;
- size_t displayed_width IF_LINT ( = 0);
+ size_t displayed_width = 0;
size_t len = 0;
bool quoted;
diff -ruN a/src/od.c b/src/od.c
--- a/src/od.c 2023-08-29 20:39:27.000000000 +0900
+++ b/src/od.c 2024-02-16 08:38:36.192481039 +0900
@@ -1563,7 +1563,7 @@
int n_files;
size_t i;
int l_c_m;
- idx_t desired_width IF_LINT ( = 0);
+ idx_t desired_width = 0;
bool modern = false;
bool width_specified = false;
bool ok = true;
@@ -1572,7 +1572,7 @@
/* The old-style 'pseudo starting address' to be printed in parentheses
after any true address. */
- uintmax_t pseudo_start IF_LINT ( = 0);
+ uintmax_t pseudo_start = 0;
initialize_main (&argc, &argv);
set_program_name (argv[0]);
diff -ruN a/src/shred.c b/src/shred.c
--- a/src/shred.c 2023-07-05 20:09:55.000000000 +0900
+++ b/src/shred.c 2024-02-16 08:36:01.559447030 +0900
@@ -398,7 +398,7 @@
{
off_t size = *sizep;
off_t offset; /* Current file position */
- time_t thresh IF_LINT ( = 0); /* Time to maybe print next status update */
+ time_t thresh = 0; /* Time to maybe print next status update */
time_t now = 0; /* Current time */
size_t lim; /* Amount of data to try writing */
size_t soff; /* Offset into buffer for next write */
diff -ruN a/src/split.c b/src/split.c
--- a/src/split.c 2023-08-29 20:39:27.000000000 +0900
+++ b/src/split.c 2024-02-16 08:39:37.739280705 +0900
@@ -1159,7 +1159,7 @@
bool wrote = false;
bool file_limit;
idx_t i_file;
- of_t *files IF_LINT (= nullptr);
+ of_t *files = nullptr;
intmax_t line_no;
if (k)
diff -ruN a/src/truncate.c b/src/truncate.c
--- a/src/truncate.c 2023-08-29 20:39:27.000000000 +0900
+++ b/src/truncate.c 2024-02-16 08:36:01.560447076 +0900
@@ -201,7 +201,7 @@
main (int argc, char **argv)
{
bool got_size = false;
- off_t size IF_LINT ( = 0);
+ off_t size = 0;
off_t rsize = -1;
rel_mode_t rel_mode = rm_abs;
int c;
diff -ruN a/src/tsort.c b/src/tsort.c
--- a/src/tsort.c 2023-08-29 20:39:27.000000000 +0900
+++ b/src/tsort.c 2024-02-16 08:36:01.560447076 +0900
@@ -352,7 +352,7 @@
struct successor *s = *p;
s->suc->count--;
*p = s->next;
- IF_LINT (free (s));
+ free (s);
break;
}
diff -ruN a/src/unexpand.c b/src/unexpand.c
--- a/src/unexpand.c 2024-02-16 08:31:42.593018769 +0900
+++ b/src/unexpand.c 2024-02-16 08:36:01.560447076 +0900
@@ -317,7 +317,7 @@
main (int argc, char **argv)
{
bool have_tabval = false;
- uintmax_t tabval IF_LINT ( = 0);
+ uintmax_t tabval = 0;
int c;
/* If true, cancel the effect of any -a (explicit or implicit in -t),
diff -ruN a/src/who.c b/src/who.c
--- a/src/who.c 2023-08-11 22:06:43.000000000 +0900
+++ b/src/who.c 2024-02-16 08:40:51.924655278 +0900
@@ -566,7 +566,7 @@
static void
scan_entries (idx_t n, struct gl_utmp const *utmp_buf)
{
- char *ttyname_b IF_LINT ( = nullptr);
+ char *ttyname_b = nullptr;
time_t boottime = TYPE_MINIMUM (time_t);
if (include_heading)