Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
7647f449
Commit
7647f449
authored
Oct 27, 2014
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2659 from swisspol/static_analysis
Fixed the most obvious Clang static analyzer warnings
parents
116a19d4
64bcf567
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
8 deletions
+3
-8
src/describe.c
+1
-3
src/diff_tform.c
+0
-2
src/oid.c
+1
-1
src/pack.c
+0
-1
src/remote.c
+1
-1
No files found.
src/describe.c
View file @
7647f449
...
@@ -571,8 +571,6 @@ static int describe(
...
@@ -571,8 +571,6 @@ static int describe(
}
}
}
}
best
=
(
struct
possible_tag
*
)
git_vector_get
(
&
all_matches
,
0
);
git_vector_sort
(
&
all_matches
);
git_vector_sort
(
&
all_matches
);
best
=
(
struct
possible_tag
*
)
git_vector_get
(
&
all_matches
,
0
);
best
=
(
struct
possible_tag
*
)
git_vector_get
(
&
all_matches
,
0
);
...
@@ -727,7 +725,7 @@ int git_describe_workdir(
...
@@ -727,7 +725,7 @@ int git_describe_workdir(
git_oid
current_id
;
git_oid
current_id
;
git_status_list
*
status
=
NULL
;
git_status_list
*
status
=
NULL
;
git_status_options
status_opts
=
GIT_STATUS_OPTIONS_INIT
;
git_status_options
status_opts
=
GIT_STATUS_OPTIONS_INIT
;
git_describe_result
*
result
;
git_describe_result
*
result
=
NULL
;
git_object
*
commit
;
git_object
*
commit
;
if
((
error
=
git_reference_name_to_id
(
&
current_id
,
repo
,
GIT_HEAD_FILE
))
<
0
)
if
((
error
=
git_reference_name_to_id
(
&
current_id
,
repo
,
GIT_HEAD_FILE
))
<
0
)
...
...
src/diff_tform.c
View file @
7647f449
...
@@ -949,8 +949,6 @@ find_best_matches:
...
@@ -949,8 +949,6 @@ find_best_matches:
* Rewrite the diffs with renames / copies
* Rewrite the diffs with renames / copies
*/
*/
tried_tgts
=
0
;
git_vector_foreach
(
&
diff
->
deltas
,
t
,
tgt
)
{
git_vector_foreach
(
&
diff
->
deltas
,
t
,
tgt
)
{
/* skip things that are not rename targets */
/* skip things that are not rename targets */
if
((
tgt
->
flags
&
GIT_DIFF_FLAG__IS_RENAME_TARGET
)
==
0
)
if
((
tgt
->
flags
&
GIT_DIFF_FLAG__IS_RENAME_TARGET
)
==
0
)
...
...
src/oid.c
View file @
7647f449
...
@@ -211,7 +211,7 @@ int git_oid_ncmp(const git_oid *oid_a, const git_oid *oid_b, size_t len)
...
@@ -211,7 +211,7 @@ int git_oid_ncmp(const git_oid *oid_a, const git_oid *oid_b, size_t len)
int
git_oid_strcmp
(
const
git_oid
*
oid_a
,
const
char
*
str
)
int
git_oid_strcmp
(
const
git_oid
*
oid_a
,
const
char
*
str
)
{
{
const
unsigned
char
*
a
=
oid_a
->
id
;
const
unsigned
char
*
a
;
unsigned
char
strval
;
unsigned
char
strval
;
int
hexval
;
int
hexval
;
...
...
src/pack.c
View file @
7647f449
...
@@ -1105,7 +1105,6 @@ int git_packfile_alloc(struct git_pack_file **pack_out, const char *path)
...
@@ -1105,7 +1105,6 @@ int git_packfile_alloc(struct git_pack_file **pack_out, const char *path)
p
->
pack_keep
=
1
;
p
->
pack_keep
=
1
;
memcpy
(
p
->
pack_name
+
root_len
,
".pack"
,
sizeof
(
".pack"
));
memcpy
(
p
->
pack_name
+
root_len
,
".pack"
,
sizeof
(
".pack"
));
path_len
=
path_len
-
strlen
(
".idx"
)
+
strlen
(
".pack"
);
}
}
if
(
p_stat
(
p
->
pack_name
,
&
st
)
<
0
||
!
S_ISREG
(
st
.
st_mode
))
{
if
(
p_stat
(
p
->
pack_name
,
&
st
)
<
0
||
!
S_ISREG
(
st
.
st_mode
))
{
...
...
src/remote.c
View file @
7647f449
...
@@ -1691,7 +1691,7 @@ int git_remote_rename(git_strarray *out, git_repository *repo, const char *name,
...
@@ -1691,7 +1691,7 @@ int git_remote_rename(git_strarray *out, git_repository *repo, const char *name,
{
{
int
error
;
int
error
;
git_vector
problem_refspecs
=
GIT_VECTOR_INIT
;
git_vector
problem_refspecs
=
GIT_VECTOR_INIT
;
git_remote
*
remote
;
git_remote
*
remote
=
NULL
;
assert
(
out
&&
repo
&&
name
&&
new_name
);
assert
(
out
&&
repo
&&
name
&&
new_name
);
...
...
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