diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-17 00:04:40 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-21 22:51:41 +0100 |
commit | 51d8e0e20e2965517a64e954d51a23be52e5f4f3 (patch) | |
tree | 5006200c8868393c7de6295822c6a533ab80ddb8 /meta/recipes-devtools/rsync | |
parent | ca943bd72fb08a12f3084a21393ca8c1d952c864 (diff) | |
download | poky-51d8e0e20e2965517a64e954d51a23be52e5f4f3.tar.gz |
rsync: Add missing prototypes to function declarations
(From OE-Core rev: c53d465865d4a9c109322074c2653a3a8b665238)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rsync')
-rw-r--r-- | meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch | 182 | ||||
-rw-r--r-- | meta/recipes-devtools/rsync/rsync_3.2.5.bb | 1 |
2 files changed, 183 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch b/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch new file mode 100644 index 0000000000..629b786d62 --- /dev/null +++ b/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch | |||
@@ -0,0 +1,182 @@ | |||
1 | From 704a240443ca5d8024cc3b01ae6c1440fa41f54a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 16 Aug 2022 23:42:24 -0700 | ||
4 | Subject: [PATCH] Add missing prototypes to function declarations | ||
5 | |||
6 | With Clang 15+ compiler -Wstrict-prototypes is triggering warnings which | ||
7 | are turned into errors with -Werror, this fixes the problem by adding | ||
8 | missing prototypes | ||
9 | |||
10 | Fixes errors like | ||
11 | | log.c:134:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] | ||
12 | | static void syslog_init() | ||
13 | | ^ | ||
14 | | void | ||
15 | |||
16 | Upstream-Status: Submitted [https://lists.samba.org/archive/rsync/2022-August/032858.html] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | checksum.c | 2 +- | ||
20 | exclude.c | 2 +- | ||
21 | hlink.c | 2 +- | ||
22 | lib/compat.c | 1 + | ||
23 | lib/pool_alloc.c | 2 +- | ||
24 | log.c | 2 +- | ||
25 | main.c | 2 +- | ||
26 | syscall.c | 4 ++-- | ||
27 | zlib/crc32.c | 2 +- | ||
28 | zlib/trees.c | 2 +- | ||
29 | zlib/zutil.c | 4 ++-- | ||
30 | 11 files changed, 13 insertions(+), 12 deletions(-) | ||
31 | |||
32 | diff --git a/checksum.c b/checksum.c | ||
33 | index fb8c0a0..174c28c 100644 | ||
34 | --- a/checksum.c | ||
35 | +++ b/checksum.c | ||
36 | @@ -629,7 +629,7 @@ int sum_end(char *sum) | ||
37 | return csum_len_for_type(cursum_type, 0); | ||
38 | } | ||
39 | |||
40 | -void init_checksum_choices() | ||
41 | +void init_checksum_choices(void) | ||
42 | { | ||
43 | #ifdef SUPPORT_XXH3 | ||
44 | char buf[32816]; | ||
45 | diff --git a/exclude.c b/exclude.c | ||
46 | index adc82e2..79f5a82 100644 | ||
47 | --- a/exclude.c | ||
48 | +++ b/exclude.c | ||
49 | @@ -358,7 +358,7 @@ void implied_include_partial_string(const char *s_start, const char *s_end) | ||
50 | memcpy(partial_string_buf, s_start, partial_string_len); | ||
51 | } | ||
52 | |||
53 | -void free_implied_include_partial_string() | ||
54 | +void free_implied_include_partial_string(void) | ||
55 | { | ||
56 | if (partial_string_buf) { | ||
57 | free(partial_string_buf); | ||
58 | diff --git a/hlink.c b/hlink.c | ||
59 | index 66810a3..aea142b 100644 | ||
60 | --- a/hlink.c | ||
61 | +++ b/hlink.c | ||
62 | @@ -117,7 +117,7 @@ static void match_gnums(int32 *ndx_list, int ndx_count) | ||
63 | struct ht_int32_node *node = NULL; | ||
64 | int32 gnum, gnum_next; | ||
65 | |||
66 | - qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)()) hlink_compare_gnum); | ||
67 | + qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)(const void *, const void *)) hlink_compare_gnum); | ||
68 | |||
69 | for (from = 0; from < ndx_count; from++) { | ||
70 | file = hlink_flist->sorted[ndx_list[from]]; | ||
71 | diff --git a/lib/compat.c b/lib/compat.c | ||
72 | index 513d79b..89b337e 100644 | ||
73 | --- a/lib/compat.c | ||
74 | +++ b/lib/compat.c | ||
75 | @@ -19,6 +19,7 @@ | ||
76 | * with this program; if not, visit the http://fsf.org website. | ||
77 | */ | ||
78 | |||
79 | +#include <sys/time.h> | ||
80 | #include "rsync.h" | ||
81 | #include "itypes.h" | ||
82 | |||
83 | diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c | ||
84 | index a1a7245..4eae062 100644 | ||
85 | --- a/lib/pool_alloc.c | ||
86 | +++ b/lib/pool_alloc.c | ||
87 | @@ -9,7 +9,7 @@ struct alloc_pool | ||
88 | size_t size; /* extent size */ | ||
89 | size_t quantum; /* allocation quantum */ | ||
90 | struct pool_extent *extents; /* top extent is "live" */ | ||
91 | - void (*bomb)(); /* called if malloc fails */ | ||
92 | + void (*bomb)(const char *, const char *, int); /* called if malloc fails */ | ||
93 | int flags; | ||
94 | |||
95 | /* statistical data */ | ||
96 | diff --git a/log.c b/log.c | ||
97 | index 44344e2..991e359 100644 | ||
98 | --- a/log.c | ||
99 | +++ b/log.c | ||
100 | @@ -131,7 +131,7 @@ static void logit(int priority, const char *buf) | ||
101 | } | ||
102 | } | ||
103 | |||
104 | -static void syslog_init() | ||
105 | +static void syslog_init(void) | ||
106 | { | ||
107 | int options = LOG_PID; | ||
108 | |||
109 | diff --git a/main.c b/main.c | ||
110 | index 9ebfbea..affa244 100644 | ||
111 | --- a/main.c | ||
112 | +++ b/main.c | ||
113 | @@ -244,7 +244,7 @@ void read_del_stats(int f) | ||
114 | stats.deleted_files += stats.deleted_specials = read_varint(f); | ||
115 | } | ||
116 | |||
117 | -static void become_copy_as_user() | ||
118 | +static void become_copy_as_user(void) | ||
119 | { | ||
120 | char *gname; | ||
121 | uid_t uid; | ||
122 | diff --git a/syscall.c b/syscall.c | ||
123 | index d92074a..92ca86d 100644 | ||
124 | --- a/syscall.c | ||
125 | +++ b/syscall.c | ||
126 | @@ -389,9 +389,9 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence) | ||
127 | { | ||
128 | #ifdef HAVE_LSEEK64 | ||
129 | #if !SIZEOF_OFF64_T | ||
130 | - OFF_T lseek64(); | ||
131 | + OFF_T lseek64(int fd, OFF_T offset, int whence); | ||
132 | #else | ||
133 | - off64_t lseek64(); | ||
134 | + off64_t lseek64(int fd, off64_t offset, int whence); | ||
135 | #endif | ||
136 | return lseek64(fd, offset, whence); | ||
137 | #else | ||
138 | diff --git a/zlib/crc32.c b/zlib/crc32.c | ||
139 | index 05733f4..50c6c02 100644 | ||
140 | --- a/zlib/crc32.c | ||
141 | +++ b/zlib/crc32.c | ||
142 | @@ -187,7 +187,7 @@ local void write_table(out, table) | ||
143 | /* ========================================================================= | ||
144 | * This function can be used by asm versions of crc32() | ||
145 | */ | ||
146 | -const z_crc_t FAR * ZEXPORT get_crc_table() | ||
147 | +const z_crc_t FAR * ZEXPORT get_crc_table(void) | ||
148 | { | ||
149 | #ifdef DYNAMIC_CRC_TABLE | ||
150 | if (crc_table_empty) | ||
151 | diff --git a/zlib/trees.c b/zlib/trees.c | ||
152 | index 9c66770..0d9047e 100644 | ||
153 | --- a/zlib/trees.c | ||
154 | +++ b/zlib/trees.c | ||
155 | @@ -231,7 +231,7 @@ local void send_bits(s, value, length) | ||
156 | /* =========================================================================== | ||
157 | * Initialize the various 'constant' tables. | ||
158 | */ | ||
159 | -local void tr_static_init() | ||
160 | +local void tr_static_init(void) | ||
161 | { | ||
162 | #if defined(GEN_TREES_H) || !defined(STDC) | ||
163 | static int static_init_done = 0; | ||
164 | diff --git a/zlib/zutil.c b/zlib/zutil.c | ||
165 | index bbba7b2..61f8dc9 100644 | ||
166 | --- a/zlib/zutil.c | ||
167 | +++ b/zlib/zutil.c | ||
168 | @@ -27,12 +27,12 @@ z_const char * const z_errmsg[10] = { | ||
169 | ""}; | ||
170 | |||
171 | |||
172 | -const char * ZEXPORT zlibVersion() | ||
173 | +const char * ZEXPORT zlibVersion(void) | ||
174 | { | ||
175 | return ZLIB_VERSION; | ||
176 | } | ||
177 | |||
178 | -uLong ZEXPORT zlibCompileFlags() | ||
179 | +uLong ZEXPORT zlibCompileFlags(void) | ||
180 | { | ||
181 | uLong flags; | ||
182 | |||
diff --git a/meta/recipes-devtools/rsync/rsync_3.2.5.bb b/meta/recipes-devtools/rsync/rsync_3.2.5.bb index a1ba5ea44d..2c2dbc4600 100644 --- a/meta/recipes-devtools/rsync/rsync_3.2.5.bb +++ b/meta/recipes-devtools/rsync/rsync_3.2.5.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \ | |||
14 | file://rsyncd.conf \ | 14 | file://rsyncd.conf \ |
15 | file://makefile-no-rebuild.patch \ | 15 | file://makefile-no-rebuild.patch \ |
16 | file://determism.patch \ | 16 | file://determism.patch \ |
17 | file://0001-Add-missing-prototypes-to-function-declarations.patch \ | ||
17 | " | 18 | " |
18 | SRC_URI[sha256sum] = "2ac4d21635cdf791867bc377c35ca6dda7f50d919a58be45057fd51600c69aba" | 19 | SRC_URI[sha256sum] = "2ac4d21635cdf791867bc377c35ca6dda7f50d919a58be45057fd51600c69aba" |
19 | 20 | ||