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
6b1eab39
Commit
6b1eab39
authored
Nov 23, 2010
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MSVC warnings and errors
Signed-off-by: Vicent Marti <tanoku@gmail.com>
parent
5dc2bee1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
src/repository.c
+4
-4
src/tag.c
+1
-1
tests/t0501-walk.c
+1
-1
No files found.
src/repository.c
View file @
6b1eab39
...
...
@@ -212,7 +212,7 @@ static int source_resize(git_odb_source *src)
size_t
write_offset
,
new_size
;
void
*
new_data
;
write_offset
=
src
->
write_ptr
-
src
->
raw
.
data
;
write_offset
=
(
size_t
)((
char
*
)
src
->
write_ptr
-
(
char
*
)
src
->
raw
.
data
)
;
new_size
=
src
->
raw
.
len
*
2
;
if
((
new_data
=
git__malloc
(
new_size
))
==
NULL
)
...
...
@@ -223,7 +223,7 @@ static int source_resize(git_odb_source *src)
src
->
raw
.
data
=
new_data
;
src
->
raw
.
len
=
new_size
;
src
->
write_ptr
=
new_data
+
write_offset
;
src
->
write_ptr
=
(
char
*
)
new_data
+
write_offset
;
return
GIT_SUCCESS
;
}
...
...
@@ -249,7 +249,7 @@ int git__source_printf(git_odb_source *source, const char *format, ...)
if
(
did_resize
)
vsnprintf
(
source
->
write_ptr
,
source
->
raw
.
len
-
source
->
written_bytes
,
format
,
arglist
);
source
->
write_ptr
+=
len
;
source
->
write_ptr
=
(
char
*
)
source
->
write_ptr
+
len
;
source
->
written_bytes
+=
len
;
return
GIT_SUCCESS
;
...
...
@@ -267,7 +267,7 @@ int git__source_write(git_odb_source *source, const void *bytes, size_t len)
}
memcpy
(
source
->
write_ptr
,
bytes
,
len
);
source
->
write_ptr
+=
len
;
source
->
write_ptr
=
(
char
*
)
source
->
write_ptr
+
len
;
source
->
written_bytes
+=
len
;
return
GIT_SUCCESS
;
...
...
src/tag.c
View file @
6b1eab39
...
...
@@ -229,6 +229,6 @@ int git_tag__writeback(git_tag *tag, git_odb_source *src)
int
git_tag__parse
(
git_tag
*
tag
)
{
assert
(
tag
&&
tag
->
object
.
source
.
open
);
return
parse_tag_buffer
(
tag
,
tag
->
object
.
source
.
raw
.
data
,
tag
->
object
.
source
.
raw
.
data
+
tag
->
object
.
source
.
raw
.
len
);
return
parse_tag_buffer
(
tag
,
tag
->
object
.
source
.
raw
.
data
,
(
char
*
)
tag
->
object
.
source
.
raw
.
data
+
tag
->
object
.
source
.
raw
.
len
);
}
tests/t0501-walk.c
View file @
6b1eab39
...
...
@@ -45,7 +45,7 @@ static const int commit_sorting_time_reverse[][6] = {
{
4
,
5
,
2
,
1
,
3
,
0
}
};
static
const
int
commit_count
=
6
;
#define commit_count 6
static
const
int
result_bytes
=
24
;
...
...
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