mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-18 11:55:32 -04:00
Fix two unused-variable compiler warnings.
This commit is contained in:
2
io.c
2
io.c
@@ -1066,7 +1066,6 @@ static int readfd_unbuffered(int fd, char *buf, size_t len)
|
||||
xbuf outbuf, inbuf;
|
||||
char ibuf[512];
|
||||
int add_null = 0;
|
||||
int pos = 0;
|
||||
|
||||
INIT_CONST_XBUF(outbuf, line);
|
||||
INIT_XBUF(inbuf, ibuf, 0, -1);
|
||||
@@ -1081,7 +1080,6 @@ static int readfd_unbuffered(int fd, char *buf, size_t len)
|
||||
if (iconvbufs(ic_send, &inbuf, &outbuf,
|
||||
ICB_INCLUDE_BAD | ICB_INCLUDE_INCOMPLETE) < 0)
|
||||
goto overflow;
|
||||
pos = -1;
|
||||
}
|
||||
if (add_null) {
|
||||
if (outbuf.len == outbuf.size)
|
||||
|
||||
13
wildtest.c
13
wildtest.c
@@ -50,15 +50,16 @@ static struct poptOption long_options[] = {
|
||||
|
||||
/* match just at the start of string (anchored tests) */
|
||||
static void
|
||||
run_test(int line, bool matches, bool same_as_fnmatch,
|
||||
run_test(int line, bool matches,
|
||||
#ifdef COMPARE_WITH_FNMATCH
|
||||
bool same_as_fnmatch,
|
||||
#endif
|
||||
const char *text, const char *pattern)
|
||||
{
|
||||
bool matched;
|
||||
#ifdef COMPARE_WITH_FNMATCH
|
||||
bool fn_matched;
|
||||
int flags = strstr(pattern, "**")? 0 : FNM_PATHNAME;
|
||||
#else
|
||||
same_as_fnmatch = 0; /* Get rid of unused-variable compiler warning. */
|
||||
#endif
|
||||
|
||||
if (explode_mod) {
|
||||
@@ -194,7 +195,11 @@ main(int argc, char **argv)
|
||||
while (*++s == ' ' || *s == '\t') {}
|
||||
}
|
||||
*end[0] = *end[1] = '\0';
|
||||
run_test(line, flag[0], flag[1], string[0], string[1]);
|
||||
run_test(line, flag[0],
|
||||
#ifdef COMPARE_WITH_FNMATCH
|
||||
flag[1],
|
||||
#endif
|
||||
string[0], string[1]);
|
||||
}
|
||||
|
||||
if (!wildmatch_errors)
|
||||
|
||||
Reference in New Issue
Block a user