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
1ec1de6d
Commit
1ec1de6d
authored
Feb 23, 2012
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings about type conversion on win32
parent
df16fbcf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/blob.c
+3
-3
src/odb.c
+2
-2
No files found.
src/blob.c
View file @
1ec1de6d
...
@@ -102,13 +102,13 @@ int git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *pat
...
@@ -102,13 +102,13 @@ int git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *pat
char
*
link_data
;
char
*
link_data
;
ssize_t
read_len
;
ssize_t
read_len
;
link_data
=
git__malloc
(
size
);
link_data
=
git__malloc
(
(
size_t
)
size
);
if
(
!
link_data
)
{
if
(
!
link_data
)
{
error
=
GIT_ENOMEM
;
error
=
GIT_ENOMEM
;
goto
cleanup
;
goto
cleanup
;
}
}
read_len
=
p_readlink
(
full_path
.
ptr
,
link_data
,
size
);
read_len
=
p_readlink
(
full_path
.
ptr
,
link_data
,
(
size_t
)
size
);
if
(
read_len
!=
(
ssize_t
)
size
)
{
if
(
read_len
!=
(
ssize_t
)
size
)
{
error
=
git__throw
(
GIT_EOSERR
,
"Failed to create blob. Can't read symlink"
);
error
=
git__throw
(
GIT_EOSERR
,
"Failed to create blob. Can't read symlink"
);
...
@@ -116,7 +116,7 @@ int git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *pat
...
@@ -116,7 +116,7 @@ int git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *pat
goto
cleanup
;
goto
cleanup
;
}
}
stream
->
write
(
stream
,
link_data
,
size
);
stream
->
write
(
stream
,
link_data
,
(
size_t
)
size
);
free
(
link_data
);
free
(
link_data
);
}
else
{
}
else
{
...
...
src/odb.c
View file @
1ec1de6d
...
@@ -164,11 +164,11 @@ int git_odb__hashlink(git_oid *out, const char *path)
...
@@ -164,11 +164,11 @@ int git_odb__hashlink(git_oid *out, const char *path)
char
*
link_data
;
char
*
link_data
;
ssize_t
read_len
;
ssize_t
read_len
;
link_data
=
git__malloc
(
size
);
link_data
=
git__malloc
(
(
size_t
)
size
);
if
(
link_data
==
NULL
)
if
(
link_data
==
NULL
)
return
GIT_ENOMEM
;
return
GIT_ENOMEM
;
read_len
=
p_readlink
(
path
,
link_data
,
size
+
1
);
read_len
=
p_readlink
(
path
,
link_data
,
(
size_t
)(
size
+
1
)
);
if
(
read_len
!=
(
ssize_t
)
size
)
if
(
read_len
!=
(
ssize_t
)
size
)
return
git__throw
(
GIT_EOSERR
,
"Failed to read symlink data"
);
return
git__throw
(
GIT_EOSERR
,
"Failed to read symlink data"
);
...
...
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