Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
fd91c3b6
Commit
fd91c3b6
authored
Sep 23, 2011
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix two unused-variable compiler warnings.
parent
15df927a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
uidlist.c
uidlist.c
+1
-2
wildtest.c
wildtest.c
+9
-4
No files found.
uidlist.c
View file @
fd91c3b6
...
@@ -445,14 +445,13 @@ void parse_name_map(char *map, BOOL usernames)
...
@@ -445,14 +445,13 @@ void parse_name_map(char *map, BOOL usernames)
{
{
struct
idlist
**
idmap_ptr
=
usernames
?
&
uidmap
:
&
gidmap
;
struct
idlist
**
idmap_ptr
=
usernames
?
&
uidmap
:
&
gidmap
;
struct
idlist
**
idlist_ptr
=
usernames
?
&
uidlist
:
&
gidlist
;
struct
idlist
**
idlist_ptr
=
usernames
?
&
uidlist
:
&
gidlist
;
char
*
colon
,
*
end
,
*
cp
=
map
+
strlen
(
map
);
char
*
colon
,
*
cp
=
map
+
strlen
(
map
);
union
name_or_id
noiu
;
union
name_or_id
noiu
;
id_t
id1
;
id_t
id1
;
uint16
flags
;
uint16
flags
;
/* Parse the list in reverse, so the order in the struct is right. */
/* Parse the list in reverse, so the order in the struct is right. */
while
(
1
)
{
while
(
1
)
{
end
=
cp
;
while
(
cp
>
map
&&
cp
[
-
1
]
!=
','
)
cp
--
;
while
(
cp
>
map
&&
cp
[
-
1
]
!=
','
)
cp
--
;
if
(
!
(
colon
=
strchr
(
cp
,
':'
)))
{
if
(
!
(
colon
=
strchr
(
cp
,
':'
)))
{
rprintf
(
FERROR
,
"No colon found in --%smap: %s
\n
"
,
rprintf
(
FERROR
,
"No colon found in --%smap: %s
\n
"
,
...
...
wildtest.c
View file @
fd91c3b6
...
@@ -51,15 +51,16 @@ static struct poptOption long_options[] = {
...
@@ -51,15 +51,16 @@ static struct poptOption long_options[] = {
/* match just at the start of string (anchored tests) */
/* match just at the start of string (anchored tests) */
static
void
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
)
const
char
*
text
,
const
char
*
pattern
)
{
{
bool
matched
;
bool
matched
;
#ifdef COMPARE_WITH_FNMATCH
#ifdef COMPARE_WITH_FNMATCH
bool
fn_matched
;
bool
fn_matched
;
int
flags
=
strstr
(
pattern
,
"**"
)
?
0
:
FNM_PATHNAME
;
int
flags
=
strstr
(
pattern
,
"**"
)
?
0
:
FNM_PATHNAME
;
#else
same_as_fnmatch
=
0
;
/* Get rid of unused-variable compiler warning. */
#endif
#endif
if
(
explode_mod
)
{
if
(
explode_mod
)
{
...
@@ -195,7 +196,11 @@ main(int argc, char **argv)
...
@@ -195,7 +196,11 @@ main(int argc, char **argv)
while
(
*++
s
==
' '
||
*
s
==
'\t'
)
{}
while
(
*++
s
==
' '
||
*
s
==
'\t'
)
{}
}
}
*
end
[
0
]
=
*
end
[
1
]
=
'\0'
;
*
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
)
if
(
!
wildmatch_errors
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment