Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e2fd09c2
Commit
e2fd09c2
authored
Oct 05, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Avoid dead assignments (Clang).
parent
58f2a3cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
43 deletions
+32
-43
builtins.c
programs/cmd/builtins.c
+32
-43
No files found.
programs/cmd/builtins.c
View file @
e2fd09c2
...
...
@@ -1587,7 +1587,10 @@ void WCMD_move (void) {
WCMD_splitpath
(
input
,
drive
,
dir
,
fname
,
ext
);
hff
=
FindFirstFileW
(
input
,
&
fd
);
while
(
hff
!=
INVALID_HANDLE_VALUE
)
{
if
(
hff
==
INVALID_HANDLE_VALUE
)
return
;
do
{
WCHAR
dest
[
MAX_PATH
];
WCHAR
src
[
MAX_PATH
];
DWORD
attribs
;
...
...
@@ -1674,14 +1677,9 @@ void WCMD_move (void) {
WCMD_print_error
();
errorlevel
=
1
;
}
}
while
(
FindNextFileW
(
hff
,
&
fd
)
!=
0
);
/* Step on to next match */
if
(
FindNextFileW
(
hff
,
&
fd
)
==
0
)
{
FindClose
(
hff
);
hff
=
INVALID_HANDLE_VALUE
;
break
;
}
}
FindClose
(
hff
);
}
/****************************************************************************
...
...
@@ -1810,7 +1808,10 @@ void WCMD_rename (void) {
WCMD_splitpath
(
input
,
drive
,
dir
,
fname
,
ext
);
hff
=
FindFirstFileW
(
input
,
&
fd
);
while
(
hff
!=
INVALID_HANDLE_VALUE
)
{
if
(
hff
==
INVALID_HANDLE_VALUE
)
return
;
do
{
WCHAR
dest
[
MAX_PATH
];
WCHAR
src
[
MAX_PATH
];
WCHAR
*
dotSrc
=
NULL
;
...
...
@@ -1866,14 +1867,9 @@ void WCMD_rename (void) {
WCMD_print_error
();
errorlevel
=
1
;
}
}
while
(
FindNextFileW
(
hff
,
&
fd
)
!=
0
);
/* Step on to next match */
if
(
FindNextFileW
(
hff
,
&
fd
)
==
0
)
{
FindClose
(
hff
);
hff
=
INVALID_HANDLE_VALUE
;
break
;
}
}
FindClose
(
hff
);
}
/*****************************************************************************
...
...
@@ -2058,33 +2054,26 @@ void WCMD_setshow_default (const WCHAR *command) {
/* Search for appropriate directory */
WINE_TRACE
(
"Looking for directory '%s'
\n
"
,
wine_dbgstr_w
(
string
));
hff
=
FindFirstFileW
(
string
,
&
fd
);
while
(
hff
!=
INVALID_HANDLE_VALUE
)
{
if
(
fd
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
WCHAR
fpath
[
MAX_PATH
];
WCHAR
drive
[
10
];
WCHAR
dir
[
MAX_PATH
];
WCHAR
fname
[
MAX_PATH
];
WCHAR
ext
[
MAX_PATH
];
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
'%'
,
's'
,
'%'
,
's'
,
'\0'
};
/* Convert path into actual directory spec */
GetFullPathNameW
(
string
,
sizeof
(
fpath
)
/
sizeof
(
WCHAR
),
fpath
,
NULL
);
WCMD_splitpath
(
fpath
,
drive
,
dir
,
fname
,
ext
);
/* Rebuild path */
wsprintfW
(
string
,
fmt
,
drive
,
dir
,
fd
.
cFileName
);
FindClose
(
hff
);
hff
=
INVALID_HANDLE_VALUE
;
break
;
}
/* Step on to next match */
if
(
FindNextFileW
(
hff
,
&
fd
)
==
0
)
{
FindClose
(
hff
);
hff
=
INVALID_HANDLE_VALUE
;
break
;
}
if
(
hff
!=
INVALID_HANDLE_VALUE
)
{
do
{
if
(
fd
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
WCHAR
fpath
[
MAX_PATH
];
WCHAR
drive
[
10
];
WCHAR
dir
[
MAX_PATH
];
WCHAR
fname
[
MAX_PATH
];
WCHAR
ext
[
MAX_PATH
];
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
'%'
,
's'
,
'%'
,
's'
,
'\0'
};
/* Convert path into actual directory spec */
GetFullPathNameW
(
string
,
sizeof
(
fpath
)
/
sizeof
(
WCHAR
),
fpath
,
NULL
);
WCMD_splitpath
(
fpath
,
drive
,
dir
,
fname
,
ext
);
/* Rebuild path */
wsprintfW
(
string
,
fmt
,
drive
,
dir
,
fd
.
cFileName
);
break
;
}
}
while
(
FindNextFileW
(
hff
,
&
fd
)
!=
0
);
FindClose
(
hff
);
}
/* Change to that directory */
...
...
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